1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:07:45 +00:00

LibLine: Correctly handle line content overflow when on last line

Fixes #2525
This commit is contained in:
AnotherTest 2020-06-08 00:31:33 +04:30 committed by Andreas Kling
parent aa3e440a58
commit 492df51e70
2 changed files with 13 additions and 2 deletions

View file

@ -250,7 +250,7 @@ private:
size_t cursor_line() const
{
return (m_drawn_cursor + m_num_columns + current_prompt_length() - 1) / m_num_columns;
return (m_drawn_cursor + m_num_columns + current_prompt_length()) / m_num_columns;
}
size_t offset_in_line() const