mirror of
https://github.com/wez/wezterm.git
synced 2024-11-22 22:42:48 +03:00
clamp cursor y position when moving the cursor
This commit is contained in:
parent
001eda902b
commit
2011eec9f2
@ -456,8 +456,9 @@ impl TerminalState {
|
||||
/// top left of the visible screen.
|
||||
/// TODO: DEC origin mode impacts the interpreation of these
|
||||
fn set_cursor_pos(&mut self, x: usize, y: usize) {
|
||||
let rows = self.screen().physical_rows;
|
||||
self.cursor_x = x;
|
||||
self.cursor_y = y;
|
||||
self.cursor_y = y.min(rows-1);
|
||||
self.state_changed = true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user