summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-06-12 04:04:30 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-06-21 03:25:23 (GMT)
commitfb626dc00044c106652ae39300b4cb613af70ab1 (patch)
tree24b895aea47ca588a8f6e77d508cad55d131145c /lib
parent82a2d6bdf9532812e2f315477494956a2f26e2cd (diff)
downloadgit-fb626dc00044c106652ae39300b4cb613af70ab1.zip
git-fb626dc00044c106652ae39300b4cb613af70ab1.tar.gz
git-fb626dc00044c106652ae39300b4cb613af70ab1.tar.bz2
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/blame.tcl6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/blame.tcl b/lib/blame.tcl
index 139171d..076233c 100644
--- a/lib/blame.tcl
+++ b/lib/blame.tcl
@@ -272,6 +272,8 @@ constructor new {i_commit i_path} {
set cursorW %W
tk_popup $w.ctxm %X %Y
"
+ bind $i <Shift-Tab> "[list focus $w_cviewer];break"
+ bind $i <Tab> "[list focus $w_cviewer];break"
}
foreach i [concat $w_columns $w_cviewer] {
@@ -287,8 +289,10 @@ constructor new {i_commit i_path} {
bind $i <Control-Key-f> {catch {%W yview scroll 1 pages};break}
}
+ bind $w_cviewer <Shift-Tab> "[list focus $w_file];break"
+ bind $w_cviewer <Tab> "[list focus $w_file];break"
bind $w_cviewer <Button-1> [list focus $w_cviewer]
- bind $top <Visibility> [list focus $top]
+ bind $w_file <Visibility> [list focus $w_file]
grid configure $w.header -sticky ew
grid configure $w.file_pane -sticky nsew