From b766c9ef2064b5a63f59aac0aa27ae46b66ae66b Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Sun, 23 Nov 2025 19:38:23 +0100 Subject: Improve current Arch Linux run log --- terminal.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'terminal.go') diff --git a/terminal.go b/terminal.go index 55eabb5..9886ef0 100644 --- a/terminal.go +++ b/terminal.go @@ -210,11 +210,13 @@ func (tw *terminalWriter) processParsedCSI( if len(params) == 0 { tw.line = tw.lineTop tw.column = 0 - } else if len(params) >= 2 && params[0] != 0 && params[1] != 0 { + } else if len(params) < 2 || params[0] <= 0 || params[1] <= 0 { + return false + } else if params[0] >= 32766 && params[1] >= 32766 { + // Ignore attempts to scan terminal bounds. + } else { tw.line = tw.lineTop + params[0] - 1 tw.column = params[1] - 1 - } else { - return false } return true case final == 'J': // Erase in Display -- cgit v1.2.3-70-g09d2