Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid refreshing previews for shell pipe commands #1281

Merged
merged 1 commit into from
Jun 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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