Code

Merge branch 'js/patience-diff'
[git.git] / contrib / difftool / git-difftool-helper
index 0b266e3603fc32d886cc9018af49cc161a065d8b..0c48506eebdaab3b04e5c018bcc5233582404432 100755 (executable)
@@ -32,7 +32,6 @@ cleanup_temp_files () {
 
 # This is called when users Ctrl-C out of git-difftool-helper
 sigint_handler () {
-       echo
        cleanup_temp_files
        exit 1
 }
@@ -53,7 +52,7 @@ launch_merge_tool () {
 
        # Create and ensure that we clean up $BACKUP
        test -f "$MERGED" && cp -- "$MERGED" "$BACKUP"
-       trap sigint_handler SIGINT
+       trap sigint_handler INT
 
        # $LOCAL and $REMOTE are temporary files so prompt
        # the user with the real $MERGED name before launching $merge_tool.
@@ -78,12 +77,16 @@ launch_merge_tool () {
                "$merge_tool_path" -o "$MERGED" "$LOCAL" "$REMOTE"
                ;;
 
-       meld|vimdiff)
+       meld)
                "$merge_tool_path" "$LOCAL" "$REMOTE"
                ;;
 
+       vimdiff)
+               "$merge_tool_path" -c "wincmd l" "$LOCAL" "$REMOTE"
+               ;;
+
        gvimdiff)
-               "$merge_tool_path" -f "$LOCAL" "$REMOTE"
+               "$merge_tool_path" -c "wincmd l" -f "$LOCAL" "$REMOTE"
                ;;
 
        xxdiff)