diff --git a/src/terminal.go b/src/terminal.go index 83b3a7b..4ddc6ba 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -1116,6 +1116,7 @@ func (t *Terminal) displayWidthWithLimit(runes []rune, prefixWidth int, limit in } func (t *Terminal) trimLeft(runes []rune, width int) ([]rune, int32) { + width = util.Max(0, width) var trimmed int32 // Assume that each rune takes at least one column on screen if len(runes) > width {