@@ -2594,6 +2594,9 @@ proc makewindow {} {
25942594 bind $ctext $ctxbut {pop_diff_menu %W %X %Y %x %y}
25952595 bind $ctext <Button-1> {focus %W}
25962596 bind $ctext <<Selection>> rehighlight_search_results
2597+ for {set i 1} {$i < 10} {incr i} {
2598+ bind . <$M1B -Key-$i > [list go_to_parent $i ]
2599+ }
25972600
25982601 set maincursor [. cget -cursor]
25992602 set textcursor [$ctext cget -cursor]
@@ -3017,6 +3020,7 @@ proc keys {} {
30173020[ mc " <Down>, n, j Move down one commit" ]
30183021[ mc " <Left>, z, h Go back in history list" ]
30193022[ mc " <Right>, x, l Go forward in history list" ]
3023+ [ mc " <%s-n> Go to n-th parent of current commit in history list" $M1T ]
30203024[ mc " <PageUp> Move up one page in commit list" ]
30213025[ mc " <PageDown> Move down one page in commit list" ]
30223026[ mc " <%s-Home> Scroll to top of commit list" $M1T ]
@@ -7497,6 +7501,14 @@ proc goforw {} {
74977501 }
74987502}
74997503
7504+ proc go_to_parent {i} {
7505+ global parents curview targetid
7506+ set ps $parents($curview,$targetid)
7507+ if {[llength $ps ] >= $i } {
7508+ selbyid [lindex $ps [expr $i - 1]]
7509+ }
7510+ }
7511+
75007512proc gettree {id} {
75017513 global treefilelist treeidlist diffids diffmergeid treepending
75027514 global nullid nullid2
0 commit comments