Skip to content

Commit

Permalink
Avoid refreshing previews for shell pipe commands (#1281)
Browse files Browse the repository at this point in the history
  • Loading branch information
joelim-work authored Jun 4, 2023
1 parent 2c13e0d commit 027538e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 027538e

Please sign in to comment.