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

This commit is contained in:
Junegunn Choi
2019-12-06 22:34:45 +09:00
parent 1e6ac5590e
commit 86e3994e87
3 changed files with 14 additions and 1 deletions

View File

@@ -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) {