diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2025-08-03 00:28:50 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2025-08-03 00:29:05 +0900 |
| commit | af0014aba8bc49f6acb35f96cb9642bf3d163edd (patch) | |
| tree | 990b3cb80d3dcbeb52a6bc577e4ca98a4fa3df9f /test | |
| parent | da3d9957098d4742bf9d0174ad5d67e656079816 (diff) | |
| download | fzf-af0014aba8bc49f6acb35f96cb9642bf3d163edd.tar.gz | |
Fix a bug where you cannot unset the default `--nth` using `change-nth`
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_core.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test_core.rb b/test/test_core.rb index 17578baf..d77bbcce 100644 --- a/test/test_core.rb +++ b/test/test_core.rb @@ -2045,4 +2045,19 @@ class TestCore < TestInteractive tmux.send_keys :b tmux.until { |lines| assert_includes lines, '> 9' } end + + def test_change_nth_unset_default + tmux.send_keys %(echo foo bar | #{FZF} --nth 2 --query fb --bind space:change-nth:), :Enter + tmux.until do + assert_equal 1, it.item_count + assert_equal 0, it.match_count + end + + tmux.send_keys :Space + + tmux.until do + assert_equal 1, it.item_count + assert_equal 1, it.match_count + end + end end |
