LibVT: Always clear "stomp" state when changing the cursor position
This fixes a bug, where we mistakenly put a character in the next row if the cursor was told to move to the rightmost column when it was already there.
This commit is contained in:
parent
2329c52ad9
commit
d8e383edd0
Notes:
sideshowbarker
2024-07-17 22:00:04 +09:00
Author: https://github.com/BertalanD Commit: https://github.com/SerenityOS/serenity/commit/d8e383edd04 Pull-request: https://github.com/SerenityOS/serenity/pull/11464
1 changed files with 1 additions and 1 deletions
|
@ -881,6 +881,7 @@ void Terminal::set_cursor(unsigned a_row, unsigned a_column, bool skip_debug)
|
|||
{
|
||||
unsigned row = min(a_row, m_rows - 1u);
|
||||
unsigned column = min(a_column, m_columns - 1u);
|
||||
m_stomp = false;
|
||||
if (row == cursor_row() && column == cursor_column())
|
||||
return;
|
||||
VERIFY(row < rows());
|
||||
|
@ -888,7 +889,6 @@ void Terminal::set_cursor(unsigned a_row, unsigned a_column, bool skip_debug)
|
|||
invalidate_cursor();
|
||||
m_current_state.cursor.row = row;
|
||||
m_current_state.cursor.column = column;
|
||||
m_stomp = false;
|
||||
invalidate_cursor();
|
||||
if (!skip_debug)
|
||||
dbgln_if(TERMINAL_DEBUG, "Set cursor position: {},{}", cursor_row(), cursor_column());
|
||||
|
|
Loading…
Add table
Reference in a new issue