Skip to content

Commit decd0a1

Browse files
jlehmannpaulusmack
authored andcommitted
gitk: Add Ctrl-W shortcut for closing the active window
To make the user experience between git gui and gitk more homogeneous, use Ctrl-W in gitk for closing the active window. When closing the main window doquit is called for proper cleanup. Signed-off-by: Jens Lehmann <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
1 parent 7963791 commit decd0a1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gitk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2383,6 +2383,8 @@ proc makewindow {} {
23832383
}
23842384
bindall <$::BM> "canvscan mark %W %x %y"
23852385
bindall <B$::BM-Motion> "canvscan dragto %W %x %y"
2386+
bind all <$M1B-Key-w> {destroy [winfo toplevel %W]}
2387+
bind . <$M1B-Key-w> doquit
23862388
bindkey <Home> selfirstline
23872389
bindkey <End> sellastline
23882390
bind . <Key-Up> "selnextline -1"
@@ -2814,6 +2816,7 @@ proc keys {} {
28142816
[mc "Gitk key bindings:"]
28152817
28162818
[mc "<%s-Q> Quit" $M1T]
2819+
[mc "<%s-W> Close window" $M1T]
28172820
[mc "<Home> Move to first commit"]
28182821
[mc "<End> Move to last commit"]
28192822
[mc "<Up>, p, i Move up one commit"]

0 commit comments

Comments
 (0)