# [PATCH] git-gui: scroll down to default selection for push dialog

1 messages from 2011-02-06 to 2011-02-06. Participants: Heiko Voigt.
Thread: https://gitlist.dev/t/26429

## Heiko Voigt, 2011-02-06 17:04

Subject: [PATCH] git-gui: scroll down to default selection for push dialog
Message-ID: <20110206170426.GB47941@book.hvoigt.net>
URL: https://gitlist.dev/e/20110206170426.GB47941%40book.hvoigt.net

```
If the list of remote/local branches is very long its inconvenient
to scroll down and find the selected branch. This patch makes the
widget automatically scroll down so its shown on the top.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
---
Note: Please also apply with 'git am -p2'

 git-gui/lib/transport.tcl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/git-gui/lib/transport.tcl b/git-gui/lib/transport.tcl
index e4e1add..6478efa 100644
--- a/git-gui/lib/transport.tcl
+++ b/git-gui/lib/transport.tcl
@@ -211,6 +211,7 @@ proc do_push_anywhere {} {
 		$w.source.l insert end $h
 		if {$h eq $current_branch} {
 			$w.source.l select set end
+			$w.source.l yview end
 		}
 	}
 	pack $w.source.l -side left -fill both -expand 1
-- 
1.7.4.34.gd2cb1

```
