git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-gui: allow closing console window with Escape

From
Pratyush Yadav <me@yadavpratyush.com>
Date
Dec 6, 2019, 22:20 UTC
Message-ID
<20191206222040.toj4enbbbbamnrww@yadavpratyush.com>

It is often expected that popup windows like the console window be close-able with Esc.

Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
---
This was requested by https://github.com/prati0100/git-gui/issues/17
 lib/console.tcl | 1 +
 1 file changed, 1 insertion(+)
diff --git a/lib/console.tcl b/lib/console.tcl
index 1f3248f..8828f6f 100644
--- a/lib/console.tcl
+++ b/lib/console.tcl
@@ -88,6 +88,7 @@ method _init {} {
 	bind_button3 $w_t "tk_popup $w.ctxm %X %Y"
 	bind $w_t <$M1B-Key-a> "$w_t tag add sel 0.0 end;break"
 	bind $w_t <$M1B-Key-A> "$w_t tag add sel 0.0 end;break"
+	bind $w <Key-Escape> [list destroy $w]
 }

 method exec {cmd {after {}}} {
--
2.24.0
Next: Johannes Schindelin
Message 1 of 9 in “git-gui: allow closing console window with Escape”
  1. git-gui: allow closing console window with EscapePratyush Yadav, Dec 6, 2019
  2. Johannes SchindelinDec 7, 2019
  3. Pratyush YadavDec 8, 2019
  4. Johannes SchindelinDec 9, 2019
  5. Vasili NovikovDec 9, 2019
  6. Pratyush YadavDec 10, 2019
  7. Vasili NovikovDec 10, 2019
  8. Pratyush YadavDec 10, 2019
  9. Johannes SchindelinDec 13, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.