summaryrefslogtreecommitdiff
path: root/lib/console.tcl
diff options
context:
space:
mode:
authorPratyush Yadav <me@yadavpratyush.com>2019-12-06 21:46:31 (GMT)
committerPratyush Yadav <me@yadavpratyush.com>2019-12-18 19:52:53 (GMT)
commit1e1ccbfdd3100a1bb656b11f973381ce4b69decf (patch)
tree6302dd6fc0f1f161f791024049af403f6c157f47 /lib/console.tcl
parent276353004822918d1f45cfc36d0717b878fff600 (diff)
downloadgit-1e1ccbfdd3100a1bb656b11f973381ce4b69decf.zip
git-1e1ccbfdd3100a1bb656b11f973381ce4b69decf.tar.gz
git-1e1ccbfdd3100a1bb656b11f973381ce4b69decf.tar.bz2
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>
Diffstat (limited to 'lib/console.tcl')
-rw-r--r--lib/console.tcl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/console.tcl b/lib/console.tcl
index 1f3248f..bb6b9c8 100644
--- a/lib/console.tcl
+++ b/lib/console.tcl
@@ -203,6 +203,8 @@ method done {ok} {
focus $w.ok
}
}
+
+ bind $w <Key-Escape> "destroy $w;break"
}
method _sb_set {sb orient first last} {