From 7e09b1531faa260226e0d4f7c850660b7ccb2f04 Mon Sep 17 00:00:00 2001
From: Alexander Gavrilov <angavrilov@gmail.com>
Date: Sun, 27 Jul 2008 10:34:21 +0400
Subject: [PATCH] git-gui: Fix the Remote menu separator.

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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/git-gui.sh b/git-gui.sh
index 7c27a43a5de..ce941adf8d9 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -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