@matheusbsbs / matheus-bagliano / commits / fb626dc000
Fork 0

git-gui: Bind Tab/Shift-Tab to cycle between panes in blame

The blame viewer is composed of two different areas, the file area on top and the commit area on the bottom. If users are trying to shift the focus it is probably because they want to shift from one area to the other, so we just setup Tab and Shift-Tab to jump from the one half to the other in a cycle. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Jun 12, 2007 at 00:04 UTC fb626dc00044c106652ae39300b4cb613af70ab1
1 file changed +5 -1
lib/blame.tcl
+5 -1
@@ -272,6 +272,8 @@ constructor new {i_commit i_path} {
272 set cursorW %W
273 tk_popup $w.ctxm %X %Y
274 "
275 + bind $i <Shift-Tab> "[list focus $w_cviewer];break"
276 + bind $i <Tab> "[list focus $w_cviewer];break"
277 }
278
279 foreach i [concat $w_columns $w_cviewer] {
@@ -287,8 +289,10 @@ constructor new {i_commit i_path} {
289 bind $i <Control-Key-f> {catch {%W yview scroll 1 pages};break}
290 }
291
292 + bind $w_cviewer <Shift-Tab> "[list focus $w_file];break"
293 + bind $w_cviewer <Tab> "[list focus $w_file];break"
294 bind $w_cviewer <Button-1> [list focus $w_cviewer]
291 - bind $top <Visibility> [list focus $top]
295 + bind $w_file <Visibility> [list focus $w_file]
296
297 grid configure $w.header -sticky ew
298 grid configure $w.file_pane -sticky nsew