Don't redraw volatile previews on ticker period (#546)
This commit is contained in:
1 parent
d62dd9353f
commit
b5f6f6edee
4 files changed
+52
-49
No files matched your search
@@ -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 := ®{loading: true, loadTime: time.Now(), path: path, volatile: true}
|
||||
nav.regCache[path] = r
|
||||
nav.previewChan <- path
|
||||
|
||||
Reference in new issue
Block a user