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
@@ -618,7 +618,7 @@ type reg struct {
|
||||
lines []string
|
||||
}
|
||||
|
||||
func (ui *ui) loadFile(nav *nav) {
|
||||
func (ui *ui) loadFile(nav *nav, volatile bool) {
|
||||
curr, err := nav.currFile()
|
||||
if err != nil {
|
||||
return
|
||||
@@ -628,11 +628,14 @@ func (ui *ui) loadFile(nav *nav) {
|
||||
return
|
||||
}
|
||||
|
||||
nav.previewChan <- ""
|
||||
if volatile {
|
||||
nav.previewChan <- ""
|
||||
}
|
||||
|
||||
if curr.IsDir() {
|
||||
ui.dirPrev = nav.loadDir(curr.path)
|
||||
} else if curr.Mode().IsRegular() {
|
||||
ui.regPrev = nav.loadReg(curr.path)
|
||||
ui.regPrev = nav.loadReg(curr.path, volatile)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user