Skip to content

Commit

Permalink
Avoid refreshing previews for async shell commands (#1164)
Browse files Browse the repository at this point in the history
  • Loading branch information
joelim-work committed Mar 20, 2023
1 parent 41cdd02 commit 8652707
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app.go
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,11 @@ func (app *app) runShell(s string, args []string, prefix string) cleanFunc {
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 {
case "%":
Expand Down

0 comments on commit 8652707

Please sign in to comment.