From d1033e756ea9c3e35c2519a3293983ca5aeb5ed9 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 13 Aug 2019 14:10:53 -0400 Subject: [PATCH] Cleaner error on -z command failure --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index f40f509..6532747 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -459,7 +459,7 @@ endfunction function! s:NullError(...) abort let [out, exec_error] = s:SystemError(call('fugitive#Prepare', a:000)) - return [exec_error ? [] : split(out, "\1"), exec_error ? out : '', exec_error] + return [exec_error ? [] : split(out, "\1"), exec_error ? substitute(out, "\n$", "", "") : '', exec_error] endfunction function! s:TreeChomp(...) abort