git-gui: Reimplement and enhance auto-selection of diffs.
[gitweb.git] / lib / mergetool.tcl
index 5f3da1f6235bc1b8cf0961f5203e95ee205f2ae8..79c58bc7bc8c79a13acd1370b184a530d67eaa20 100644 (file)
@@ -24,13 +24,9 @@ This operation can be undone only by restarting the merge." \
 }
 
 proc merge_add_resolution {path} {
-       global current_diff_path
+       global current_diff_path ui_workdir
 
-       if {$path eq $current_diff_path} {
-               set after {reshow_diff;}
-       } else {
-               set after {}
-       }
+       set after [next_diff_after_action $ui_workdir $path {} {^_?U}]
 
        update_index \
                [mc "Adding resolution for %s" [short_path $path]] \