From c1244ea7d0445977cf63d3ba5d12ba553f9739bc Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Wed, 18 Sep 2019 22:53:25 -0400 Subject: [PATCH] Default to left, not right split for empty :Gdiffsplit filename This only happens in weird circumstances such as when you call :Gdiffsplit in a commit object. --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 6ebf080..bec6f57 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -4479,7 +4479,7 @@ function! fugitive#Diffsplit(autodir, keepfocus, mods, arg, args) abort exe pre let restore = s:diff_restore() let w:fugitive_diff_restore = restore - if s:CompareAge(commit, s:DirCommitFile(spec)[1]) < 0 + if len(spec) && s:CompareAge(commit, s:DirCommitFile(spec)[1]) < 0 let mods = s:Mods(mods, 'rightbelow') else let mods = s:Mods(mods, 'leftabove')