git-gui: Make Ctrl-T safe to use for conflicting files.
[gitweb.git] / git-gui.sh
index 09ce4101f12741679070cad7ccadf7ee191f86bc..4d52f02dcec076d2d1af1c2e542068dbe2fcffde 100755 (executable)
@@ -2090,7 +2090,9 @@ proc toggle_or_diff {w x y} {
        if {$col == 0 && $y > 1} {
                # Conflicts need special handling
                if {[string first {U} $state] >= 0} {
-                       merge_stage_workdir $path $w $lno
+                       # $w must always be $ui_workdir, but...
+                       if {$w ne $ui_workdir} { set lno {} }
+                       merge_stage_workdir $path $lno
                        return
                }