]> git.ipfire.org Git - thirdparty/git.git/commit
vimdiff: make layout engine more robust against user vim settings
authorFernando Ramos <greenfoo@u92.eu>
Fri, 8 Jul 2022 18:10:24 +0000 (20:10 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 8 Jul 2022 20:15:50 +0000 (13:15 -0700)
commitf3d7623a13566048c4a48b9db6bb09765588a735
treedf83251e20914431171eab8f91bda1f4834c31f3
parent980145f7470e20826ca22d7343494712eda9c81d
vimdiff: make layout engine more robust against user vim settings

'vim' has two configuration options ('splitbelow' and 'splitright') that
change the way the 'split' command behaves. When they are set, the
commands that the layout engine generates no longer work as expected.

In order to fix this we can append special keyword 'leftabove' to each
'split' and 'vertical split' subcommand found inside the command string
generated by the layout engine.

This works because whatever comes after 'leftabove' will temporally
ignore settings 'splitbelow' and 'splitright'.

Reported-by: Matthew Klein <mklein994@gmail.com>
Signed-off-by: Fernando Ramos <greenfoo@u92.eu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
mergetools/vimdiff