mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 21:33:53 -05:00
Respect 'splitbelow' on :Gdiffsplit with argument
When calling :Gdiffsplit with no argument, we always end up with the work tree version as half of the diff, and it is helpful to position that consistently. I generalized this to a consistent older versus newer ordering when given an argument, but I don't think that has proven very useful in practice. This also introduces a minor behavior change where calling the bang variant in the initial commit now loads an empty version of the buffer, rather than falling back to the work tree.
This commit is contained in:
@@ -184,10 +184,11 @@ that are part of Git repositories).
|
||||
:Gdiffsplit [object] Perform a |vimdiff| against the given file, or if a
|
||||
commit is given, the current file in that commit.
|
||||
With no argument, the version in the index or work
|
||||
tree is used. The newer of the two files is placed to
|
||||
the right or bottom, depending on 'diffopt' and the
|
||||
width of the window relative to 'textwidth'. Use
|
||||
Vim's |do| and |dp| to stage and unstage changes.
|
||||
tree is used, and the work tree version is always
|
||||
placed to the right or bottom. A vertical split is
|
||||
used if space permits, and if 'diffopt' does not
|
||||
otherwise specify. Use Vim's |do| and |dp| to stage
|
||||
and unstage changes.
|
||||
|
||||
*:Gdiffsplit!*
|
||||
:Gdiffsplit! Diff against any and all direct ancestors, retaining
|
||||
|
||||
Reference in New Issue
Block a user