motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit c1244ea7d0445977cf63d3ba5d12ba553f9739bc (tree)
parent eec184e8b095a4dc57875d754003ef3cf9733ab0
Author: Tim Pope <code@tpope.net>
Date:   Wed, 18 Sep 2019 22:53:25 -0400

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.

Diffstat:
Mautoload/fugitive.vim | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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')