diff --git a/CHANGELOG.md b/CHANGELOG.md index d6a72df5..4e4432fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,21 +3,29 @@ CHANGELOG 0.67.0 ------ -- Added `--freeze-left=N` option to keep the leftmost N columns visible. +- Added `--freeze-left=N` option to keep the leftmost N columns always visible. ```sh - # Keeps the file name column fixed and always visible + # Keep the file name column fixed and always visible git grep --line-number --color=always -- '' | fzf --ansi --delimiter : --freeze-left 1 - # Used with --keep-right + # Can be used with --keep-right git grep --line-number --color=always -- '' | fzf --ansi --delimiter : --freeze-left 1 --keep-right ``` -- Also added `--freeze-right=N` option to keep the rightmost N columns visible. +- Also added `--freeze-right=N` option to keep the rightmost N columns always visible. ```sh + # Stronger version of --keep-right that always keeps the right-end visible + fd | fzf --freeze-right 1 + + # Keep the base name always visible fd | fzf --freeze-right 1 --delimiter / + + # Keep both leftmost and rightmost components visible fd | fzf --freeze-left 1 --freeze-right 1 --delimiter / ``` +- Updated `--info=inline` to print the spinner (load indicator). +- Bug fixes 0.66.1 ------ diff --git a/src/terminal.go b/src/terminal.go index 8cb8fd71..21d76225 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -3745,9 +3745,14 @@ func (t *Terminal) printHighlighted(result Result, colBase tui.ColorPair, colMat offs[idx].offset[1] -= int32(shift) } maxe -= shift - displayWidth = t.displayWidthWithLimit(runes, 0, maxWidth) - if !t.wrap && displayWidth > maxWidth { - ellipsis, ellipsisWidth := util.Truncate(t.ellipsis, maxWidth/2) + ellipsis, ellipsisWidth := util.Truncate(t.ellipsis, maxWidth) + adjustedMaxWidth := maxWidth + if fidx < 2 { + // For frozen parts, reserve space for the ellipsis in the middle part + adjustedMaxWidth -= ellipsisWidth + } + displayWidth = t.displayWidthWithLimit(runes, 0, adjustedMaxWidth) + if !t.wrap && displayWidth > adjustedMaxWidth { maxe = util.Constrain(maxe+util.Min(maxWidth/2-ellipsisWidth, t.hscrollOff), 0, len(runes)) transformOffsets := func(diff int32, rightTrim bool) { for idx, offset := range offs {