From 13f8b7f319b0f43785f0ab775f71584afdbdbf02 Mon Sep 17 00:00:00 2001 From: Joe Lim <50560759+joelim-work@users.noreply.github.com> Date: Sat, 3 Jun 2023 18:52:49 +1000 Subject: [PATCH] Avoid refreshing previews for shell pipe commands --- app.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app.go b/app.go index f05a7a30..e2de0ee6 100644 --- a/app.go +++ b/app.go @@ -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)