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

+3
View File
@@ -611,12 +611,14 @@ func (e *setExpr) eval(app *app, args []string) {
app.ui.echoerr("preview: value should be empty, 'true', or 'false'")
return
}
app.ui.loadFile(app, true)
case "nopreview":
if e.val != "" {
app.ui.echoerrf("nopreview: unexpected value: %s", e.val)
return
}
gOpts.preview = false
app.ui.loadFile(app, true)
case "preview!":
if e.val != "" {
app.ui.echoerrf("preview!: unexpected value: %s", e.val)
@@ -627,6 +629,7 @@ func (e *setExpr) eval(app *app, args []string) {
return
}
gOpts.preview = !gOpts.preview
app.ui.loadFile(app, true)
case "previewer":
gOpts.previewer = replaceTilde(e.val)
case "promptfmt":