mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-12-23 03:19:01 +00:00
Make preview updated when reload and change-query are combined
Fix #2744
This commit is contained in:
parent
ef67a45702
commit
5209e95bc7
@ -12,7 +12,7 @@ CHANGELOG
|
||||
fzf --nth=-1 --no-hscroll --ellipsis='' |
|
||||
awk '{print $2}'
|
||||
```
|
||||
- Increased TTY buffer limit (#2748)
|
||||
- Bug fixes and improvements
|
||||
|
||||
0.29.0
|
||||
------
|
||||
|
@ -673,6 +673,7 @@ func (t *Terminal) UpdateList(merger *Merger, reset bool) {
|
||||
t.merger = merger
|
||||
if reset {
|
||||
t.selected = make(map[int32]selectedItem)
|
||||
t.version++
|
||||
}
|
||||
t.mutex.Unlock()
|
||||
t.reqBox.Set(reqInfo, nil)
|
||||
|
@ -2077,6 +2077,15 @@ class TestGoFZF < TestBase
|
||||
tmux.until { |lines| assert_includes lines[1], '4' }
|
||||
end
|
||||
|
||||
def test_reload_and_change_preview_should_update_preview
|
||||
tmux.send_keys "seq 3 | #{FZF} --bind 'ctrl-t:reload(echo 4)+change-preview(echo {})'", :Enter
|
||||
tmux.until { |lines| assert_equal 3, lines.item_count }
|
||||
tmux.until { |lines| refute_includes lines[1], '1' }
|
||||
tmux.send_keys 'C-t'
|
||||
tmux.until { |lines| assert_equal 1, lines.item_count }
|
||||
tmux.until { |lines| assert_includes lines[1], '4' }
|
||||
end
|
||||
|
||||
def test_scroll_off
|
||||
tmux.send_keys "seq 1000 | #{FZF} --scroll-off=3 --bind l:last", :Enter
|
||||
tmux.until { |lines| assert_equal 1000, lines.item_count }
|
||||
|
Loading…
Reference in New Issue
Block a user