Skip to content
Myr

Avoid truncating ellipsis to avoid confusion

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 1df99db · Browse files · 2 files+20 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+20 added−7 removed

  • other:+20 added−7 removed

2 files+20 added−7 removed

modified:src/terminal.go+8 added-3 removed
3743 unmodified lines
3744 offs[idx].offset[0] -= int32(shift)3745 offs[idx].offset[1] -= int32(shift)3746 }3747 maxe -= shift3748 displayWidth = t.displayWidthWithLimit(runes, 0, maxWidth)3749 if !t.wrap && displayWidth > maxWidth {3750 ellipsis, ellipsisWidth := util.Truncate(t.ellipsis, maxWidth/2)3748 ellipsis, ellipsisWidth := util.Truncate(t.ellipsis, maxWidth)3749 adjustedMaxWidth := maxWidth3750 if fidx < 2 {3751 // For frozen parts, reserve space for the ellipsis in the middle part3752 adjustedMaxWidth -= ellipsisWidth3753 }3754 displayWidth = t.displayWidthWithLimit(runes, 0, adjustedMaxWidth)3755 if !t.wrap && displayWidth > adjustedMaxWidth {3756 maxe = util.Constrain(maxe+util.Min(maxWidth/2-ellipsisWidth, t.hscrollOff), 0, len(runes))3757 transformOffsets := func(diff int32, rightTrim bool) {3758 for idx, offset := range offs {3759 b, e := offset.offset[0], offset.offset[1]
3612 unmodified lines
modified:CHANGELOG.md+12 added-4 removed
1 unmodified line
2=========340.67.05------6- Added `--freeze-left=N` option to keep the leftmost N columns visible.6- Added `--freeze-left=N` option to keep the leftmost N columns always visible.7 ```sh8 # Keeps the file name column fixed and always visible8 # Keep the file name column fixed and always visible9 git grep --line-number --color=always -- '' |10 fzf --ansi --delimiter : --freeze-left 11112 # Used with --keep-right12 # Can be used with --keep-right13 git grep --line-number --color=always -- '' |14 fzf --ansi --delimiter : --freeze-left 1 --keep-right15 ```16- Also added `--freeze-right=N` option to keep the rightmost N columns visible.16- Also added `--freeze-right=N` option to keep the rightmost N columns always visible.17 ```sh18 # Stronger version of --keep-right that always keeps the right-end visible19 fd | fzf --freeze-right 12021 # Keep the base name always visible22 fd | fzf --freeze-right 1 --delimiter /2324 # Keep both leftmost and rightmost components visible25 fd | fzf --freeze-left 1 --freeze-right 1 --delimiter /26 ```27- Updated `--info=inline` to print the spinner (load indicator).28- Bug fixes29300.66.131------32- Bug fixes
3087 unmodified lines