lineMoveVisRelUp n | n < 0 = lineMoveVisRelDown $ negate n
                   | otherwise = do
    wid <- width <$> use lastActiveWindowA
    col <- curCol
    len <- pointB >>= eolPointB >>= colOf
    let jumps = (len `div` wid) - (col `div` wid)
        next = n - jumps
    if next <= 0
        then moveXorEol (n * wid)
        else do moveXorEol (jumps * wid)
                void $ gotoLnFrom 1
                lineMoveVisRelUp $ next - 1
lineMoveVisRelUp n | n < 0 = lineMoveVisRelDown $ negate n
                   | otherwise = do
    wid <- width <$> use lastActiveWindowA
    col <- curCol
    len <- pointB >>= eolPointB >>= colOf
    let jumps = (len `div` wid) - (col `div` wid)
        next = n - jumps
    if next <= 0
        then moveXorEol (n * wid)
        else do moveXorEol (jumps * wid)
                void $ gotoLnFrom 1
                lineMoveVisRelUp $ next - 1
lineMoveVisRelUp n | n < 0 = lineMoveVisRelDown $ negate n
                   | otherwise = do
    wid <- width <$> use lastActiveWindowA
    col <- curCol
    len <- pointB >>= eolPointB >>= colOf
    let jumps = (len `div` wid) - (col `div` wid)
        next = n - jumps
    if next <= 0
        then moveXorEol (n * wid)
        else do moveXorEol (jumps * wid)
                void $ gotoLnFrom 1
                lineMoveVisRelUp $ next - 1