mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-17 07:43:39 -05:00
Allow removing header line with change-header and transform-header
If the new header is an empty string. fzf --header loading --bind 'start:reload:sleep 3; ls' --bind 'load:change-header:' fzf --header loading --bind 'start:reload:sleep 3; ls' --bind 'load:transform-header:'
This commit is contained in:
@@ -3358,11 +3358,13 @@ class TestGoFZF < TestBase
|
||||
end
|
||||
|
||||
def test_start_on_reload
|
||||
tmux.send_keys %(echo foo | #{FZF} --header Loading --header-lines 1 --bind 'start:reload:sleep 2; echo bar' --bind 'load:change-header:Loaded'), :Enter
|
||||
tmux.send_keys %(echo foo | #{FZF} --header Loading --header-lines 1 --bind 'start:reload:sleep 2; echo bar' --bind 'load:change-header:Loaded' --bind space:change-header:), :Enter
|
||||
tmux.until(timeout: 1) { |lines| assert_includes lines[-3], 'Loading' }
|
||||
tmux.until(timeout: 1) { |lines| refute_includes lines[-4], 'foo' }
|
||||
tmux.until { |lines| assert_includes lines[-3], 'Loaded' }
|
||||
tmux.until { |lines| assert_includes lines[-4], 'bar' }
|
||||
tmux.send_keys :Space
|
||||
tmux.until { |lines| assert_includes lines[-3], 'bar' }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user