Code

git-gui: Fix the Remote menu separator.
authorAlexander Gavrilov <angavrilov@gmail.com>
Sun, 27 Jul 2008 06:34:21 +0000 (10:34 +0400)
committerShawn O. Pearce <spearce@spearce.org>
Sun, 27 Jul 2008 15:08:09 +0000 (08:08 -0700)
It was positioned incorrectly (offset by one position)
if the menu had a tear-off handle.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh

index 7c27a43a5de5394d2d1a482c456c1123798b64fc..ce941adf8d910743bd7112daaed382dc105342e8 100755 (executable)
@@ -2925,6 +2925,7 @@ if {[is_enabled transport]} {
        populate_fetch_menu
        set n [expr {[.mbar.remote index end] - $n}]
        if {$n > 0} {
+               if {[.mbar.remote type 0] eq "tearoff"} { incr n }
                .mbar.remote insert $n separator
        }
        unset n