Reset {n} after reload

Fix #2611
This commit is contained in:
Junegunn Choi
2021-09-14 16:58:26 +09:00
parent 3f90fb42d8
commit 0f02fc0c77
3 changed files with 18 additions and 0 deletions

View File

@@ -233,6 +233,7 @@ func Run(opts *Options, version string, revision string) {
clearCache = util.Once(true)
clearSelection = util.Once(true)
chunkList.Clear()
itemIndex = 0
header = make([]string, 0, opts.HeaderLines)
go reader.restart(command)
}