diff options
author | Koichi Murase <myoga.murase@gmail.com> | 2024-05-28 00:18:44 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-27 17:18:44 +0200 |
commit | 5f5d6df22e41de3b1edb00388515deca49d70640 (patch) | |
tree | a61c363314047c8ddebc50744565ba0a767a50a5 | |
parent | 626516050f1b979d73eb6d0b766b5747ac3e37e2 (diff) |
fix(grid): fix the default bound of DECSTBM lying outside the screen (#3381)
-rw-r--r-- | zellij-server/src/panes/grid.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zellij-server/src/panes/grid.rs b/zellij-server/src/panes/grid.rs index 8b532bb4e..66bed1483 100644 --- a/zellij-server/src/panes/grid.rs +++ b/zellij-server/src/panes/grid.rs @@ -1573,7 +1573,7 @@ impl Grid { self.cursor_is_hidden = false; } pub fn set_scroll_region(&mut self, top_line_index: usize, bottom_line_index: Option<usize>) { - let bottom_line_index = bottom_line_index.unwrap_or(self.height); + let bottom_line_index = bottom_line_index.unwrap_or(self.height.saturating_sub(1)); self.scroll_region = Some((top_line_index, bottom_line_index)); let mut pad_character = EMPTY_TERMINAL_CHARACTER; pad_character.styles = self.cursor.pending_styles.clone(); |