Skip to content
Myr

Fix slice bound error on extremely narrow screen

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent b62a74b · Browse files · 1 file+1 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−0 removed

  • other:+1 added−0 removed

1 file+1 added−0 removed

modified:src/terminal.go+1 added
1114 unmodified lines
1115 return l1116}11171118func (t *Terminal) trimLeft(runes []rune, width int) ([]rune, int32) {1119 width = util.Max(0, width)1120 var trimmed int321121 // Assume that each rune takes at least one column on screen1122 if len(runes) > width {1123 diff := len(runes) - width
1510 unmodified lines