From 7795748a3f42e86a802cc9ea9569429892f47f95 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 27 May 2023 15:10:47 +0900 Subject: [PATCH] Remove dead code --- src/core.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/core.go b/src/core.go index 042d863f..e049fb43 100644 --- a/src/core.go +++ b/src/core.go @@ -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()