Guarantee preview/previewClear ordering (#537)
* Use chan struct{} in place of chan bool
* Revert "nav.checkReg now returns a boolean instead of calling nav.preview"
* Guarantee preview/previewClear ordering
* Pass the file path to the cleaner script
This commit is contained in:
1 parent
72567c9237
commit
1e94f4533e
9 files changed
+48
-41
No files matched your search
@@ -625,12 +625,11 @@ func (ui *ui) loadFile(nav *nav) {
|
||||
return
|
||||
}
|
||||
|
||||
go nav.previewClear()
|
||||
nav.previewChan <- ""
|
||||
if curr.IsDir() {
|
||||
ui.dirPrev = nav.loadDir(curr.path)
|
||||
} else if curr.Mode().IsRegular() {
|
||||
win := ui.wins[len(ui.wins)-1]
|
||||
ui.regPrev = nav.loadReg(curr.path, win)
|
||||
ui.regPrev = nav.loadReg(curr.path)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user