m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-16 07:13:48 -05:00

Fix incorrect truncation of --info-command with --info=inline-right

Fix #4479
This commit is contained in:
Junegunn Choi
2025-08-08 18:51:24 +09:00
parent e5cd7f0a3a
commit 1afd143810
2 changed files with 6 additions and 1 deletions

View File

@@ -1394,7 +1394,7 @@ func (t *Terminal) ansiLabelPrinter(str string, color *tui.ColorPair, fill bool)
if !fill {
ellipsis, ellipsisWidth = util.Truncate(t.ellipsis, limit)
}
if length > limit-ellipsisWidth {
if length > limit {
trimmedRunes, _ := t.trimRight(runes, limit-ellipsisWidth)
window.CPrint(*color, string(trimmedRunes)+string(ellipsis))
} else if fill {