mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-06-03 07:50:49 +00:00
Properly clear list when --header-lines not filled on reload
This commit is contained in:
parent
1e6ac5590e
commit
86e3994e87
|
@ -24,6 +24,10 @@ CHANGELOG
|
||||||
```sh
|
```sh
|
||||||
fzf --multi --bind 'ctrl-l:select-all+execute(less {+f})+deselect-all'
|
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
|
0.19.0
|
||||||
------
|
------
|
||||||
|
|
|
@ -295,7 +295,9 @@ func Run(opts *Options, revision string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
case EvtHeader:
|
case EvtHeader:
|
||||||
terminal.UpdateHeader(value.([]string))
|
header := value.([]string)
|
||||||
|
header = append(header, make([]string, opts.HeaderLines-len(header))...)
|
||||||
|
terminal.UpdateHeader(header)
|
||||||
|
|
||||||
case EvtSearchFin:
|
case EvtSearchFin:
|
||||||
switch val := value.(type) {
|
switch val := value.(type) {
|
||||||
|
|
|
@ -1647,6 +1647,13 @@ class TestGoFZF < TestBase
|
||||||
tmux.send_keys :Space
|
tmux.send_keys :Space
|
||||||
tmux.until { |lines| lines.item_count == 10 }
|
tmux.until { |lines| lines.item_count == 10 }
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
module TestShell
|
module TestShell
|
||||||
|
|
Loading…
Reference in New Issue
Block a user