Clean image preview on set preview! (#1350)

Properly clean (`ueberzug`) image preview when disabling it using
for example `set preview!`.

Also change "clearing" to "cleaning" in docs.
This commit is contained in:
Jonáš Dujava authored and GitHub committed 2023-07-22 14:24:35 +03:00
1 parent 23418adc00
commit 42c16f1882
5 files changed
+10 -7

No files matched your search

+4 -4
View File
@@ -696,14 +696,14 @@ func (ui *ui) loadFile(app *app, volatile bool) {
onSelect(app)
}
if !gOpts.preview {
return
}
if volatile {
app.nav.previewChan <- ""
}
if !gOpts.preview {
return
}
if curr.IsDir() {
ui.dirPrev = app.nav.loadDir(curr.path)
} else if curr.Mode().IsRegular() {