git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Pratyush Yadav <me@yadavpratyush.com>
To: git@vger.kernel.org
Subject: [PATCH] git-gui: allow closing console window with Escape
Date: Sat, 7 Dec 2019 03:50:40 +0530	[thread overview]
Message-ID: <20191206222040.toj4enbbbbamnrww@yadavpratyush.com> (raw)

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


             reply	other threads:[~2019-12-06 22:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-06 22:20 Pratyush Yadav [this message]
2019-12-07 16:24 ` [PATCH] git-gui: allow closing console window with Escape Johannes Schindelin
2019-12-08 19:40   ` Pratyush Yadav
2019-12-09  9:18     ` Johannes Schindelin
2019-12-09 15:53       ` Vasili Novikov
2019-12-10 12:02         ` Pratyush Yadav
2019-12-10 12:11           ` Vasili Novikov
2019-12-10 13:31             ` Pratyush Yadav
2019-12-13 13:29               ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191206222040.toj4enbbbbamnrww@yadavpratyush.com \
    --to=me@yadavpratyush.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).