Don't redraw volatile previews on ticker period (#546)

This commit is contained in:
neeshy authored and GitHub committed 2021-01-04 17:01:29 +03:00
1 parent d62dd9353f
commit b5f6f6edee
4 files changed
+52 -49

No files matched your search

+2 -2
View File
@@ -548,9 +548,9 @@ func (nav *nav) preview(path string, win *win) {
}
}
func (nav *nav) loadReg(path string) *reg {
func (nav *nav) loadReg(path string, volatile bool) *reg {
r, ok := nav.regCache[path]
if !ok || r.volatile {
if !ok || (volatile && r.volatile) {
r := &reg{loading: true, loadTime: time.Now(), path: path, volatile: true}
nav.regCache[path] = r
nav.previewChan <- path