Avoid blurring status when :Gedit argument parsing throws an error

This commit is contained in:
Tim Pope
2023-03-01 16:41:38 -05:00
parent d507d00bd0
commit b54ee90d56

View File

@@ -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