From f8ae1786dd69e10c0e74d7c9499658a64bb816ca Mon Sep 17 00:00:00 2001 From: Wenxuan Date: Thu, 24 Sep 2020 10:06:20 +0800 Subject: [PATCH] Fix items width limit (#2190) --- src/terminal.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/terminal.go b/src/terminal.go index d610c805..6b8dfcfa 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -1048,7 +1048,7 @@ func (t *Terminal) printHighlighted(result Result, attr tui.Attr, col1 tui.Color } offsets := result.colorOffsets(charOffsets, t.theme, col2, attr, current) - maxWidth := t.window.Width() - 3 + maxWidth := t.window.Width() - (t.pointerLen + t.markerLen + 1) maxe = util.Constrain(maxe+util.Min(maxWidth/2-2, t.hscrollOff), 0, len(text)) displayWidth := t.displayWidthWithLimit(text, 0, maxWidth) if displayWidth > maxWidth {