mirror of
https://github.com/junegunn/fzf
synced 2024-11-10 13:10:44 +00:00
Remove dead code
This commit is contained in:
parent
098ef4d7cf
commit
7795748a3f
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user