fix(terminal): correct display width calculation with maxWidth (#4596)
Some checks failed
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Generate Sponsors README / deploy (push) Has been cancelled

fix #4593

* test(core): add test for --freeze-right with long ellipsis
This commit is contained in:
LangLangBart
2025-11-20 01:09:36 +01:00
committed by GitHub
parent 2ab923f3ae
commit 3db63f5e52
2 changed files with 11 additions and 1 deletions

View File

@@ -3807,7 +3807,7 @@ func (t *Terminal) printHighlighted(result Result, colBase tui.ColorPair, colMat
offs[idx].offset[1] = util.Min32(offset.offset[1], int32(maxWidth))
}
}
displayWidth = t.displayWidthWithLimit(runes, 0, displayWidth)
displayWidth = t.displayWidthWithLimit(runes, 0, maxWidth)
}
displayWidthSum += displayWidth