scrollCursorToBottomB :: BufferM ()
scrollCursorToBottomB = do
    -- NOTE: This is only an approximation.
    --       The correct scroll amount depends on how many lines just above
    --       the current viewport are going to be wrapped. We don't have this
    --       information here as wrapping is done in the frontend.
    MarkSet f i _ <- markLines
    h <- askWindow actualLines
    scrollB $ i - f - h + 1

-- | Scroll by n lines.
scrollCursorToBottomB :: BufferM ()
scrollCursorToBottomB = do
    -- NOTE: This is only an approximation.
    --       The correct scroll amount depends on how many lines just above
    --       the current viewport are going to be wrapped. We don't have this
    --       information here as wrapping is done in the frontend.
    MarkSet f i _ <- markLines
    h <- askWindow actualLines
    scrollB $ i - f - h + 1

-- | Scroll by n lines.
scrollCursorToBottomB = do
    -- NOTE: This is only an approximation.
    --       The correct scroll amount depends on how many lines just above
    --       the current viewport are going to be wrapped. We don't have this
    --       information here as wrapping is done in the frontend.
    MarkSet f i _ <- markLines
    h <- askWindow actualLines
    scrollB $ i - f - h + 1

-- | Scroll by n lines.