Properly clear list when --header-lines not filled on reload

pull/1677/head^2
Junegunn Choi 5 years ago
parent 1e6ac5590e
commit 86e3994e87

@ -24,6 +24,10 @@ CHANGELOG
```sh
fzf --multi --bind 'ctrl-l:select-all+execute(less {+f})+deselect-all'
```
- Fixed bugs of reload action
- Not triggered when there's no match even when the command doesn't have
any placeholder expressions
- Screen not properly cleared when `--header-lines` not filled on reload
0.19.0
------

@ -295,7 +295,9 @@ func Run(opts *Options, revision string) {
}
case EvtHeader:
terminal.UpdateHeader(value.([]string))
header := value.([]string)
header = append(header, make([]string, opts.HeaderLines-len(header))...)
terminal.UpdateHeader(header)
case EvtSearchFin:
switch val := value.(type) {

@ -1647,6 +1647,13 @@ class TestGoFZF < TestBase
tmux.send_keys :Space
tmux.until { |lines| lines.item_count == 10 }
end
def test_clear_list_when_header_lines_changed_due_to_reload
tmux.send_keys %(seq 10 | #{FZF} --header 0 --header-lines 3 --bind 'space:reload(seq 1)'), :Enter
tmux.until { |lines| lines.any? { |line| line.include?('9') } }
tmux.send_keys :Space
tmux.until { |lines| lines.none? { |line| line.include?('9') } }
end
end
module TestShell

Loading…
Cancel
Save