Skip to content
Myr

Reorder info line: N/M (X) (S%) +S +T*

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

Flags that appear/disappear are now at the end, so the multi-select indicator stays in a fixed position and doesn't flicker.

authored by Junegunn Choi · committed by Junegunn Choi · parent b5f7221 · Browse files · 2 files+12 added−12 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+12 added−12 removed

  • tests:+2 added−2 removed
  • other:+10 added−10 removed

2 files+12 added−12 removed

modified:src/terminal.go+10 added-10 removed
3028 unmodified lines
30293030 found := t.resultMerger.Length()3031 total := max(found, t.count)3032 output := fmt.Sprintf("%d/%d", found, total)3033 if t.multi > 0 {3034 if t.multi == maxMulti {3035 output += fmt.Sprintf(" (%d)", len(t.selected))3036 } else {3037 output += fmt.Sprintf(" (%d/%d)", len(t.selected), t.multi)3038 }3039 }3040 if t.progress > 0 && t.progress < 100 {3041 output += fmt.Sprintf(" (%d%%)", t.progress)3042 }3043 if t.toggleSort {3044 if t.sort {3045 output += " +S"3046 } else {
12 unmodified lines
3059 } else {3060 output += " +t"3061 }3062 }3053 if t.multi > 0 {3054 if t.multi == maxMulti {3055 output += fmt.Sprintf(" (%d)", len(t.selected))3056 } else {3057 output += fmt.Sprintf(" (%d/%d)", len(t.selected), t.multi)3058 }3059 }3060 if t.progress > 0 && t.progress < 100 {3061 output += fmt.Sprintf(" (%d%%)", t.progress)3062 }3063 if t.failed != nil && t.count == 0 {3064 output = fmt.Sprintf("[Command failed: %s]", *t.failed)3065 }3066 var outputPrinter labelPrinter
4865 unmodified lines
modified:test/test_core.rb+2 added-2 removed
402 unmodified lines
403 ['--toggle-sort=ctrl-r', '--bind=ctrl-r:toggle-sort'].each do |opt|404 tmux.send_keys "seq 1 111 | #{fzf("-m +s --tac #{opt} -q11")}", :Enter405 tmux.until { |lines| assert_equal '> 111', lines[-3] }406 tmux.send_keys :Tab407 tmux.until { |lines| assert_equal ' 4/111 -S (1)', lines[-2] }407 tmux.until { |lines| assert_equal ' 4/111 (1) -S', lines[-2] }408 tmux.send_keys 'C-R'409 tmux.until { |lines| assert_equal '> 11', lines[-3] }410 tmux.send_keys :Tab411 tmux.until { |lines| assert_equal ' 4/111 +S (2)', lines[-2] }411 tmux.until { |lines| assert_equal ' 4/111 (2) +S', lines[-2] }412 tmux.send_keys :Enter413 assert_equal %w[111 11], fzf_output_lines414 end415 end
2271 unmodified lines