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

Fix change-preview reset by change-preview-window

Fix #3770
This commit is contained in:
Junegunn Choi
2024-05-06 09:40:02 +09:00
parent bf184449bc
commit 24ff66d4a9
2 changed files with 8 additions and 0 deletions

View File

@@ -2693,6 +2693,13 @@ class TestGoFZF < TestBase
end
end
def test_change_preview_window_should_not_reset_change_preview
tmux.send_keys "#{FZF} --preview-window up,border-none --bind 'start:change-preview(echo hello)' --bind 'enter:change-preview-window(border-left)'", :Enter
tmux.until { |lines| assert_equal 'hello', lines[0] }
tmux.send_keys :Enter
tmux.until { |lines| assert_equal '│ hello', lines[0] }
end
def test_change_preview_window_rotate
tmux.send_keys "seq 100 | #{FZF} --preview-window left,border-none --preview 'echo hello' --bind '" \
"a:change-preview-window(right|down|up|hidden|)'", :Enter