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
commit 492df51e70
Notes: sideshowbarker 2024-07-19 05:45:54 +09:00
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