terminal: CSI S compatiblity improvements

Fixes #9905

This fixes a major compatibility issues with the CSI S sequence:

When our top margin is at the top (row 0) without left/right
margins, we should be creating scrollback. Previously, we were
only deleting.
This commit is contained in:
Mitchell Hashimoto
2025-12-14 13:58:02 -08:00
parent 2cc7341b08
commit 1fdc0c0b9f
3 changed files with 182 additions and 17 deletions

View File

@@ -246,7 +246,7 @@ pub const StreamHandler = struct {
.insert_lines => self.terminal.insertLines(value),
.insert_blanks => self.terminal.insertBlanks(value),
.delete_lines => self.terminal.deleteLines(value),
.scroll_up => self.terminal.scrollUp(value),
.scroll_up => try self.terminal.scrollUp(value),
.scroll_down => self.terminal.scrollDown(value),
.tab_clear_current => self.terminal.tabClear(.current),
.tab_clear_all => self.terminal.tabClear(.all),