Remove dead code

This commit is contained in:
Junegunn Choi 2023-05-27 15:10:47 +09:00
parent 098ef4d7cf
commit 7795748a3f
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627
1 changed files with 0 additions and 7 deletions

View File

@ -231,17 +231,11 @@ func Run(opts *Options, version string, revision string) {
useSnapshot := false
var snapshot []*Chunk
var prevSnapshot []*Chunk
var count int
restart := func(command string) {
reading = true
clearCache = util.Once(true)
clearSelection = util.Once(true)
// We should not update snapshot if reload is triggered again while
// the previous reload is in progress
if useSnapshot && prevSnapshot != nil {
snapshot, count = chunkList.Snapshot()
}
chunkList.Clear()
itemIndex = 0
header = make([]string, 0, opts.HeaderLines)
@ -280,7 +274,6 @@ func Run(opts *Options, version string, revision string) {
}
if useSnapshot && evt == EvtReadFin {
useSnapshot = false
prevSnapshot = nil
}
if !useSnapshot {
snapshot, count = chunkList.Snapshot()