summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/terminal.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/terminal.go b/src/terminal.go
index 83b3a7b5..4ddc6bae 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 {