Skip to content

Commit

Permalink
git-gui: Bind Tab/Shift-Tab to cycle between panes in blame
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn O. Pearce committed Jun 21, 2007
1 parent 82a2d6b commit fb626dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/blame.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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] {
Expand All @@ -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
Expand Down

0 comments on commit fb626dc

Please sign in to comment.