From 881ad1ed0bd88acc7568c07e35daa4b81c4aa1c9 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 26 Jul 2019 21:22:19 -0400 Subject: [PATCH] Guard against missing output on :Gcommit success --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 463451d..6e6ed0e 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -3111,7 +3111,7 @@ function! s:CommitCommand(line1, line2, range, count, bang, mods, reg, arg, args return '1' . after elseif empty(errors) let out = readfile(outfile) - echo get(out, -1, '') =~# 'stash\|\d' ? get(out, -2, '') : out[-1] + echo get(out, -1, '') =~# 'stash\|\d' ? get(out, -2, '') : get(out, -1, '') return after[1:-1] else echo join(errors, "\n")