From ac32fbb3b2d58a7ba61a9a8b1c09420dc4870199 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 13 Feb 2025 22:12:25 +0900 Subject: [PATCH] Avoid printing items in an extremely narrow screen --- src/terminal.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/terminal.go b/src/terminal.go index 9a411b33fb0..a81e2c79f28 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -3172,7 +3172,9 @@ func (t *Terminal) printHighlighted(result Result, colBase tui.ColorPair, colMat displayWidth = t.displayWidthWithLimit(line, 0, displayWidth) } - t.printColoredString(t.window, line, offsets, colBase) + if maxWidth > 0 { + t.printColoredString(t.window, line, offsets, colBase) + } if postTask != nil { postTask(actualLineNum, displayWidth, wasWrapped, forceRedraw) } else {