Avoid refreshing previews for shell pipe commands (#1281)

This commit is contained in:
Joe Lim authored and GitHub committed 2023-06-04 19:04:29 +03:00
1 parent 2c13e0d7d6
commit 027538eabf
1 file changed
+1 -7
+1 -7
View File
@@ -526,7 +526,7 @@ func (app *app) runShell(s string, args []string, prefix string) {
return
}
// We are running the command asynchroniously
// We are running the command asynchronously
if prefix == "%" {
if app.ui.cmdPrefix == ">" {
return
@@ -549,12 +549,6 @@ func (app *app) runShell(s string, args []string, prefix string) {
app.ui.echoerrf("running shell: %s", err)
}
// 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 {
case "%":
normal(app)