All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: David Aguilar <davvid@gmail.com>, Dickson Wong <dicksonwong@gmail.com>
Subject: Re: [PATCH] mergetool: reorder vim/gvim buffers in three-way diffs
Date: Tue, 09 Feb 2016 14:25:11 -0800	[thread overview]
Message-ID: <xmqqr3gl1pyw.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <xmqq1t90jkcr.fsf@gitster.mtv.corp.google.com> (Junio C. Hamano's message of "Fri, 29 Jan 2016 10:45:08 -0800")

Junio C Hamano <gitster@pobox.com> writes:

> Dickson Wong <dicksonwong@gmail.com> writes:
>
>> When invoking default (g)vimdiff three-way merge, the merged file is
>> loaded as the first buffer but moved to the bottom as the fourth window.
>> This causes a disconnect between vim commands that operate on window
>> positions (e.g. CTRL-W_w) and those that operate on buffer index (e.g.
>> do/dp).
>>
>> This change reorders the buffers to have the same index as windows while
>> keeping the cursor default to the merged result as the bottom window.
>>
>> Signed-off-by: Dickson Wong <dicksonwong@gmail.com>
>> ---
>
> David, I unfortunately do not use 'mergetools' myself and certainly
> not vimdiff.
>
> Opinions?

Second call for help.  Any comments on this from anybody other than
the author that I missed to support this change?

>
>>  mergetools/vimdiff | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/mergetools/vimdiff b/mergetools/vimdiff
>> index 1ddfbfc..74ea6d5 100644
>> --- a/mergetools/vimdiff
>> +++ b/mergetools/vimdiff
>> @@ -2,22 +2,22 @@ diff_cmd () {
>>  	"$merge_tool_path" -R -f -d \
>>  		-c 'wincmd l' -c 'cd $GIT_PREFIX' "$LOCAL" "$REMOTE"
>>  }
>>  
>>  merge_cmd () {
>>  	touch "$BACKUP"
>>  	case "$1" in
>>  	gvimdiff|vimdiff)
>>  		if $base_present
>>  		then
>> -			"$merge_tool_path" -f -d -c 'wincmd J' \
>> -				"$MERGED" "$LOCAL" "$BASE" "$REMOTE"
>> +			"$merge_tool_path" -f -d -c '4wincmd w | wincmd J' \
>> +				"$LOCAL" "$BASE" "$REMOTE" "$MERGED"
>>  		else
>>  			"$merge_tool_path" -f -d -c 'wincmd l' \
>>  				"$LOCAL" "$MERGED" "$REMOTE"
>>  		fi
>>  		;;
>>  	gvimdiff2|vimdiff2)
>>  		"$merge_tool_path" -f -d -c 'wincmd l' \
>>  			"$LOCAL" "$MERGED" "$REMOTE"
>>  		;;
>>  	gvimdiff3|vimdiff3)

  reply	other threads:[~2016-02-09 22:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29  2:18 [PATCH] mergetool: reorder vim/gvim buffers in three-way diffs Dickson Wong
2016-01-29 18:45 ` Junio C Hamano
2016-02-09 22:25   ` Junio C Hamano [this message]
2016-02-10 14:40     ` Michael J Gruber
2016-02-10 17:45       ` Junio C Hamano
2016-02-11 15:44         ` Michael J Gruber
2016-02-11 16:03           ` Junio C Hamano
2016-02-11 19:24             ` Dickson Wong
2016-02-11 19:31               ` Junio C Hamano
2016-02-11 20:10                 ` Dickson Wong
2016-02-11 21:15             ` David Aguilar
2016-02-12 18:15               ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqr3gl1pyw.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=davvid@gmail.com \
    --cc=dicksonwong@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.