Avoid refreshing previews for async shell commands (#1164)

This commit is contained in:
Joe Lim authored and GitHub committed 2023-03-20 19:59:39 +03:00
1 parent 41cdd02572
commit 8652707299
1 file changed
+5 -1
+5 -1
View File
@@ -563,7 +563,11 @@ func (app *app) runShell(s string, args []string, prefix string) cleanFunc {
anyKey() anyKey()
} }
app.ui.loadFile(app, true) // Asynchronous shell invocations return immediately without waiting for the
// command to finish, so there is no point refreshing the preview if nothing
// has changed yet.
volatile := prefix != "&"
app.ui.loadFile(app, volatile)
switch prefix { switch prefix {
case "%": case "%":