mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:28:11 +00:00
LibVT: Fix off-by-ones in ED (Erase in Display) and EL (Erase in Line)
This commit is contained in:
parent
edbe7d3769
commit
4ed5c13792
1 changed files with 3 additions and 3 deletions
|
@ -411,7 +411,7 @@ void Terminal::escape$K(const ParamVector& params)
|
|||
break;
|
||||
case 1:
|
||||
// Clear from cursor to beginning of line.
|
||||
for (int i = 0; i < m_cursor_column; ++i) {
|
||||
for (int i = 0; i <= m_cursor_column; ++i) {
|
||||
put_character_at(m_cursor_row, i, ' ');
|
||||
}
|
||||
break;
|
||||
|
@ -444,8 +444,8 @@ void Terminal::escape$J(const ParamVector& params)
|
|||
}
|
||||
break;
|
||||
case 1:
|
||||
/// Clear from cursor to beginning of screen
|
||||
for (int i = m_cursor_column - 1; i >= 0; --i)
|
||||
// Clear from cursor to beginning of screen.
|
||||
for (int i = m_cursor_column; i >= 0; --i)
|
||||
put_character_at(m_cursor_row, i, ' ');
|
||||
for (int row = m_cursor_row - 1; row >= 0; --row) {
|
||||
for (int column = 0; column < m_columns; ++column) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue