@matheusbsbs / matheus-bagliano / commits / 1e1ccbfdd3
Fork 0

git-gui: allow closing console window with Escape

This gives users a quick shortcut to close the window. But since the window can also show commands in progress, closing the window on Escape can give the perception that the command has been cancelled even though it hasn't been. So, only enable this binding when the command is done. Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>

Pratyush Yadav committed Dec 7, 2019 at 03:16 UTC 1e1ccbfdd3100a1bb656b11f973381ce4b69decf
1 file changed +2
lib/console.tcl
+2
@@ -203,6 +203,8 @@ method done {ok} {
203 focus $w.ok
204 }
205 }
206 +
207 + bind $w <Key-Escape> "destroy $w;break"
208 }
209
210 method _sb_set {sb orient first last} {