2
0
mirror of https://github.com/junegunn/fzf synced 2024-11-10 13:10:44 +00:00

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

View File

@ -231,17 +231,11 @@ func Run(opts *Options, version string, revision string) {
useSnapshot := false useSnapshot := false
var snapshot []*Chunk var snapshot []*Chunk
var prevSnapshot []*Chunk
var count int var count int
restart := func(command string) { restart := func(command string) {
reading = true reading = true
clearCache = util.Once(true) clearCache = util.Once(true)
clearSelection = 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() chunkList.Clear()
itemIndex = 0 itemIndex = 0
header = make([]string, 0, opts.HeaderLines) header = make([]string, 0, opts.HeaderLines)
@ -280,7 +274,6 @@ func Run(opts *Options, version string, revision string) {
} }
if useSnapshot && evt == EvtReadFin { if useSnapshot && evt == EvtReadFin {
useSnapshot = false useSnapshot = false
prevSnapshot = nil
} }
if !useSnapshot { if !useSnapshot {
snapshot, count = chunkList.Snapshot() snapshot, count = chunkList.Snapshot()