From bad1331607d64768322f2d193877fcc3d0ef7952 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 31 Dec 2018 01:52:03 -0500 Subject: [PATCH] Don't jump from :Gstatus another :Gstatus --- autoload/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index c7eb72e..9e407fb 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -3879,7 +3879,7 @@ endfunction function! s:GF(mode) abort try - let results = &filetype ==# 'fugitive' ? [s:StatusCfile()] : &filetype ==# 'gitcommit' ? s:MessageCfile() : s:cfile() + let results = &filetype ==# 'fugitive' ? [s:StatusCfile()] : &filetype ==# 'gitcommit' ? [s:MessageCfile()] : s:cfile() catch /^fugitive:/ return 'echoerr v:errmsg' endtry @@ -3887,7 +3887,7 @@ function! s:GF(mode) abort return 'G' . a:mode . \ ' +' . escape(join(results[1:-1], '|'), '| ') . ' ' . \ s:fnameescape(results[0]) - elseif len(results) + elseif len(results) && len(results[0]) return 'G' . a:mode . ' ' . s:fnameescape(results[0]) else return ''