diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-08-10 11:03:03 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-08-10 11:03:03 -0700 |
commit | 67de23ddb1ed5471e302f6a84fae7a9037a0d980 (patch) | |
tree | 92588a7bef801b233b9c6ae69a6629808a9c5aba /gitk-git/gitk | |
parent | f82887f29010e1ec88ec1930a99ddc56b6438452 (diff) | |
parent | 09898e7c3b040086e8addd4ef226548c9dce1460 (diff) | |
download | git-67de23ddb1ed5471e302f6a84fae7a9037a0d980.tar.gz |
Merge branch 'master' of git://ozlabs.org/~paulus/gitk
* 'master' of git://ozlabs.org/~paulus/gitk:
gitk: Updated Bulgarian translation (302t,0f,0u)
gitk: Add keybinding to switch to parent commit
Diffstat (limited to 'gitk-git/gitk')
-rwxr-xr-x | gitk-git/gitk | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gitk-git/gitk b/gitk-git/gitk index c8df35dee5..3520bdaebc 100755 --- a/gitk-git/gitk +++ b/gitk-git/gitk @@ -2594,6 +2594,9 @@ proc makewindow {} { bind $ctext $ctxbut {pop_diff_menu %W %X %Y %x %y} bind $ctext <Button-1> {focus %W} bind $ctext <<Selection>> rehighlight_search_results + for {set i 1} {$i < 10} {incr i} { + bind . <$M1B-Key-$i> [list go_to_parent $i] + } set maincursor [. cget -cursor] set textcursor [$ctext cget -cursor] @@ -3017,6 +3020,7 @@ proc keys {} { [mc "<Down>, n, j Move down one commit"] [mc "<Left>, z, h Go back in history list"] [mc "<Right>, x, l Go forward in history list"] +[mc "<%s-n> Go to n-th parent of current commit in history list" $M1T] [mc "<PageUp> Move up one page in commit list"] [mc "<PageDown> Move down one page in commit list"] [mc "<%s-Home> Scroll to top of commit list" $M1T] @@ -7497,6 +7501,14 @@ proc goforw {} { } } +proc go_to_parent {i} { + global parents curview targetid + set ps $parents($curview,$targetid) + if {[llength $ps] >= $i} { + selbyid [lindex $ps [expr $i - 1]] + } +} + proc gettree {id} { global treefilelist treeidlist diffids diffmergeid treepending global nullid nullid2 |