aboutsummaryrefslogtreecommitdiff
path: root/git-gui.sh
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-05-01 15:51:09 -0400
committerShawn O. Pearce <spearce@spearce.org>2007-05-07 23:35:51 -0400
commit60aa065f6958a888d14178ca94f17a60100d3709 (patch)
tree8f665c9f5d8d923ec5aadbbfecfe649315946465 /git-gui.sh
parenta35d65d9c8a2a6a10d369c00e22aded6fbdff2a9 (diff)
downloadgit-60aa065f6958a888d14178ca94f17a60100d3709.tar.gz
git-60aa065f6958a888d14178ca94f17a60100d3709.tar.xz
git-gui: Allow vi keys to scroll the diff/blame regions
Users who are used to vi and recent versions of gitk may want to scroll the diff region using vi style keybindings. Since these aren't bound to anything else and that widget does not accept focus for data input, we can easily support that too. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-xgit-gui.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 72673c627..dc6664c68 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -2038,6 +2038,12 @@ bind $ui_diff <Key-Up> {catch {%W yview scroll -1 units};break}
bind $ui_diff <Key-Down> {catch {%W yview scroll 1 units};break}
bind $ui_diff <Key-Left> {catch {%W xview scroll -1 units};break}
bind $ui_diff <Key-Right> {catch {%W xview scroll 1 units};break}
+bind $ui_diff <Key-k> {catch {%W yview scroll -1 units};break}
+bind $ui_diff <Key-j> {catch {%W yview scroll 1 units};break}
+bind $ui_diff <Key-h> {catch {%W xview scroll -1 units};break}
+bind $ui_diff <Key-l> {catch {%W xview scroll 1 units};break}
+bind $ui_diff <Control-Key-b> {catch {%W yview scroll -1 pages};break}
+bind $ui_diff <Control-Key-f> {catch {%W yview scroll 1 pages};break}
bind $ui_diff <Button-1> {focus %W}
if {[is_enabled branch]} {