From b54ee90d56a8f6815d7e827c919bc2a7c8d357ad Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Wed, 1 Mar 2023 16:41:38 -0500 Subject: [PATCH] Avoid blurring status when :Gedit argument parsing throws an error --- autoload/fugitive.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 3d15275..6e57ee0 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -6134,15 +6134,15 @@ function! fugitive#Open(cmd, bang, mods, arg, ...) abort return 'echoerr ' . string(':G' . a:cmd . '! for temp buffer output has been replaced by :' . get(s:bang_edits, a:cmd, 'Git') . ' --paginate') endif - let mods = s:Mods(a:mods) - if a:cmd ==# 'edit' - call s:BlurStatus() - endif try let [file, pre] = s:OpenParse(a:arg, 1, 0) catch /^fugitive:/ return 'echoerr ' . string(v:exception) endtry + let mods = s:Mods(a:mods) + if a:cmd ==# 'edit' + call s:BlurStatus() + endif return mods . a:cmd . pre . ' ' . s:fnameescape(file) endfunction