Skip to content
Myr

Make preview updated when reload and change-query are combined

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

Fix #2744

authored by Junegunn Choi · committed by Junegunn Choi · parent ef67a45 · Browse files · 3 files+11 added−1 removed
This commit

State

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

Diff stats

3 files+11 added−1 removed

  • tests:+9 added−0 removed
  • other:+2 added−1 removed

3 files+11 added−1 removed

modified:src/terminal.go+1 added
671 unmodified lines
672 t.progress = 100673 t.merger = merger674 if reset {675 t.selected = make(map[int32]selectedItem)676 t.version++677 }678 t.mutex.Unlock()679 t.reqBox.Set(reqInfo, nil)680 t.reqBox.Set(reqList, nil)
2219 unmodified lines
modified:test/test_go.rb+9 added
2075 unmodified lines
2076 tmux.send_keys 'C-t'2077 tmux.until { |lines| assert_includes lines[1], '4' }2078 end20792080 def test_reload_and_change_preview_should_update_preview2081 tmux.send_keys "seq 3 | #{FZF} --bind 'ctrl-t:reload(echo 4)+change-preview(echo {})'", :Enter2082 tmux.until { |lines| assert_equal 3, lines.item_count }2083 tmux.until { |lines| refute_includes lines[1], '1' }2084 tmux.send_keys 'C-t'2085 tmux.until { |lines| assert_equal 1, lines.item_count }2086 tmux.until { |lines| assert_includes lines[1], '4' }2087 end20882089 def test_scroll_off2090 tmux.send_keys "seq 1000 | #{FZF} --scroll-off=3 --bind l:last", :Enter2091 tmux.until { |lines| assert_equal 1000, lines.item_count }2092 height = tmux.until { |lines| lines }.first.to_i
615 unmodified lines
modified:CHANGELOG.md+1 added-1 removed
10 unmodified lines
11 awk '{printf "%s%1000s\n", $2, $1}' |12 fzf --nth=-1 --no-hscroll --ellipsis='' |13 awk '{print $2}'14 ```15- Increased TTY buffer limit (#2748)15- Bug fixes and improvements16170.29.018------19- Added `change-preview(...)` action to change the `--preview` command
1200 unmodified lines