Skip to content
Myr

Fix a bug where you cannot unset the default `--nth` using `change-nth`

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent da3d995 · Browse files · 3 files+17 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+17 added−1 removed

  • tests:+15 added−0 removed
  • other:+2 added−1 removed

3 files+17 added−1 removed

modified:src/terminal.go+1 added-1 removed
5724 unmodified lines
5725 case actChangeNth, actTransformNth, actBgTransformNth:5726 capture(true, func(expr string) {5727 // Split nth expression5728 tokens := strings.Split(expr, "|")5729 if nth, err := splitNth(tokens[0]); err == nil {5729 if nth, err := splitNth(tokens[0]); err == nil || len(expr) == 0 {5730 // Changed5731 newNth = &nth5732 } else {5733 // The default
1280 unmodified lines
modified:test/test_core.rb+15 added
2043 unmodified lines
2044 tmux.until { |lines| assert_includes lines, '> 3' }2045 tmux.send_keys :b2046 tmux.until { |lines| assert_includes lines, '> 9' }2047 end20482049 def test_change_nth_unset_default2050 tmux.send_keys %(echo foo bar | #{FZF} --nth 2 --query fb --bind space:change-nth:), :Enter2051 tmux.until do2052 assert_equal 1, it.item_count2053 assert_equal 0, it.match_count2054 end20552056 tmux.send_keys :Space20572058 tmux.until do2059 assert_equal 1, it.item_count2060 assert_equal 1, it.match_count2061 end2062 end2063end
modified:CHANGELOG.md+1 added
2 unmodified lines
340.65.15------6- Fixed incorrect `$FZF_CLICK_HEADER_WORD` and `$FZF_CLICK_FOOTER_WORD` when the header or footer contains ANSI escape sequences and tab characters.7- Fixed a bug where you cannot unset the default `--nth` using `change-nth` action.890.65.010------11- Added `click-footer` event that is triggered when the footer section is clicked. When the event is triggered, the following environment variables are set:
2775 unmodified lines