git/mergetools
Felipe Contreras 79db50d821 mergetools: vimdiff: make vimdiff3 actually work
When vimdiff3 was added in 7c147b77d3 (mergetools: add vimdiff3 mode,
2014-04-20), the description made clear the intention:

    It's similar to the default, except that the other windows are
    hidden.  This ensures that removed/added colors are still visible on
    the main merge window, but the other windows not visible.

However, in 0041797449 (vimdiff: new implementation with layout support,
2022-03-30) this was broken by generating a command that never creates
windows, and therefore vim never shows the diff.

The layout support implementation broke the whole purpose of vimdiff3,
and simply shows MERGED, which is no different from simply opening the
file with vim.

In order to show the diff, the windows need to be created first, and
then when they are hidden the diff remains (if hidenoff isn't set), but
by setting the `hidden` option the initial buffers are marked as hidden
thus making the feature work.

Suggested-by: Fernando Ramos <greenfoo@u92.eu>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Reviewed-by: Fernando Ramos <greenfoo@u92.eu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-08-10 12:39:17 -07:00
..
araxis mergetools: add description to all diff/merge tools 2022-04-03 15:10:04 -07:00
bc mergetools: add description to all diff/merge tools 2022-04-03 15:10:04 -07:00
codecompare mergetools: add description to all diff/merge tools 2022-04-03 15:10:04 -07:00
deltawalker mergetools: add description to all diff/merge tools 2022-04-03 15:10:04 -07:00
diffmerge mergetools: add description to all diff/merge tools 2022-04-03 15:10:04 -07:00
diffuse mergetools: add description to all diff/merge tools 2022-04-03 15:10:04 -07:00
ecmerge mergetools: add description to all diff/merge tools 2022-04-03 15:10:04 -07:00
emerge mergetools: add description to all diff/merge tools 2022-04-03 15:10:04 -07:00
examdiff mergetools: add description to all diff/merge tools 2022-04-03 15:10:04 -07:00
guiffy mergetools: add description to all diff/merge tools 2022-04-03 15:10:04 -07:00
gvimdiff mergetools: simplify how we handle "vim" and "defaults" 2013-01-28 19:00:38 -08:00
kdiff3 mergetools: add description to all diff/merge tools 2022-04-03 15:10:04 -07:00
kompare mergetools: add description to all diff/merge tools 2022-04-03 15:10:04 -07:00
meld mergetools: add description to all diff/merge tools 2022-04-03 15:10:04 -07:00
nvimdiff mergetools: add support for nvimdiff (neovim) family 2020-07-29 14:44:49 -07:00
opendiff mergetools: add description to all diff/merge tools 2022-04-03 15:10:04 -07:00
p4merge mergetools: add description to all diff/merge tools 2022-04-03 15:10:04 -07:00
smerge mergetools: add description to all diff/merge tools 2022-04-03 15:10:04 -07:00
tkdiff mergetools: add description to all diff/merge tools 2022-04-03 15:10:04 -07:00
tortoisemerge mergetools: add description to all diff/merge tools 2022-04-03 15:10:04 -07:00
vimdiff mergetools: vimdiff: make vimdiff3 actually work 2022-08-10 12:39:17 -07:00
winmerge mergetools: add description to all diff/merge tools 2022-04-03 15:10:04 -07:00
xxdiff mergetools: add description to all diff/merge tools 2022-04-03 15:10:04 -07:00