mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:37:34 +00:00
LibVT: Prevent u16
underflow when resizing terminal to a height of 1
Resizing the Terminal window to its smallest size no longer crashes. Fixes #7296.
This commit is contained in:
parent
19e6befddc
commit
441555ea56
1 changed files with 1 additions and 1 deletions
|
@ -781,7 +781,7 @@ void Terminal::scroll_up(u16 region_top, u16 region_bottom, size_t count)
|
||||||
}
|
}
|
||||||
// Set dirty flag on swapped lines.
|
// Set dirty flag on swapped lines.
|
||||||
// The other lines have implicitly been set dirty by being cleared.
|
// The other lines have implicitly been set dirty by being cleared.
|
||||||
for (u16 row = region_top; row <= region_bottom - count; ++row)
|
for (u16 row = region_top; row + count <= region_bottom; ++row)
|
||||||
active_buffer()[row].set_dirty(true);
|
active_buffer()[row].set_dirty(true);
|
||||||
m_client.terminal_history_changed(history_delta);
|
m_client.terminal_history_changed(history_delta);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue