m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-17 07:43:39 -05:00

Fix crash when preview window is hidden on focus event

This commit is contained in:
Junegunn Choi
2023-11-17 19:13:37 +09:00
parent 7320b7df62
commit 29e67d307a
2 changed files with 14 additions and 4 deletions

View File

@@ -3020,6 +3020,13 @@ class TestGoFZF < TestBase
tmux.send_keys :x
tmux.until { |lines| assert(lines.any? { |line| line.include?('[x-foo]') }) }
end
def test_preview_window_hidden_on_focus
tmux.send_keys "seq 3 | #{FZF} --preview 'echo {}' --bind focus:hide-preview", :Enter
tmux.until { |lines| assert_includes lines, '> 1' }
tmux.send_keys :Up
tmux.until { |lines| assert_includes lines, '> 2' }
end
end
module TestShell