diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2021-10-23 01:06:15 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2021-10-23 01:06:15 +0900 |
commit | 97ae8afb6f83b545eac530a689d7b3d46e20eec1 (patch) | |
tree | cacb293a60391943371898b6e2d1e7dcde97ffb4 | |
parent | 4138333f5cfb6e21b0f8d63a43add4c70c25cdaf (diff) |
Reload should update preview window
Fix #2644
-rw-r--r-- | src/terminal.go | 1 | ||||
-rwxr-xr-x | test/test_go.rb | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/terminal.go b/src/terminal.go index 8a8e1658..07fa986a 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -2673,6 +2673,7 @@ func (t *Terminal) Loop() { command := t.replacePlaceholder(a.a, false, string(t.input), list) newCommand = &command t.reading = true + t.version++ } case actUnbind: keys := parseKeyChords(a.a, "PANIC") diff --git a/test/test_go.rb b/test/test_go.rb index 059e7182..2e33185b 100755 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -2069,6 +2069,13 @@ class TestGoFZF < TestBase tmux.send_keys :Up tmux.until { |lines| assert_includes lines[1], '[[99]]' } end + + def test_reload_should_update_preview + tmux.send_keys "seq 3 | #{FZF} --bind 'ctrl-t:reload:echo 4' --preview 'echo {}' --preview-window 'nohidden'", :Enter + tmux.until { |lines| assert_includes lines[1], '1' } + tmux.send_keys 'C-t' + tmux.until { |lines| assert_includes lines[1], '4' } + end end module TestShell |