Skip to content

Commit

Permalink
Avoid printing items in an extremely narrow screen
Browse files Browse the repository at this point in the history
  • Loading branch information
junegunn committed Feb 13, 2025
1 parent 7d26eca commit ac32fbb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ac32fbb

Please sign in to comment.