Skip to content
Myr

Reset {n} after reload

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

Fix #2611

authored by Junegunn Choi · committed by Junegunn Choi · parent 3f90fb4 · Browse files · 3 files+18 added−0 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+18 added−0 removed

  • tests:+16 added−0 removed
  • other:+2 added−0 removed

3 files+18 added−0 removed

modified:src/core.go+1 added
231 unmodified lines
232 reading = true233 clearCache = util.Once(true)234 clearSelection = util.Once(true)235 chunkList.Clear()236 itemIndex = 0237 header = make([]string, 0, opts.HeaderLines)238 go reader.restart(command)239 }240 eventBox.Watch(EvtReadNew)
111 unmodified lines
modified:test/test_go.rb+16 added
2051 unmodified lines
2052 tmux.until { |lines| assert_equal '>', lines[-1] }2053 tmux.send_keys 'dabcd'2054 tmux.until { |lines| assert_equal '> abcd', lines[-1] }2055 end20562057 def test_item_index_reset_on_reload2058 tmux.send_keys "seq 10 | #{FZF} --preview 'echo [[{n}]]' --bind 'up:last,down:first,space:reload:seq 100'", :Enter2059 tmux.until { |lines| assert_includes lines[1], '[[0]]' }2060 tmux.send_keys :Up2061 tmux.until { |lines| assert_includes lines[1], '[[9]]' }2062 tmux.send_keys :Down2063 tmux.until { |lines| assert_includes lines[1], '[[0]]' }2064 tmux.send_keys :Space2065 tmux.until do |lines|2066 assert_equal 100, lines.item_count2067 assert_includes lines[1], '[[0]]'2068 end2069 tmux.send_keys :Up2070 tmux.until { |lines| assert_includes lines[1], '[[99]]' }2071 end2072end20732074module TestShell2075 def setup
478 unmodified lines
modified:CHANGELOG.md+1 added
3 unmodified lines
40.27.35------6- Preview window is `hidden` by default when there are `preview` bindings but7 `--preview` command is not given8- Fixed bug where `{n}` is not properly reset on `reload`9- Vim plugin10 - `sinklist` is added as a synonym to `sink*` so that it's easier to add11 a function to a spec dictionary12 ```vim
1160 unmodified lines