From patchwork Fri Dec 6 22:20:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pratyush Yadav X-Patchwork-Id: 11277115 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A2CF6930 for ; Fri, 6 Dec 2019 22:20:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7F42B206DB for ; Fri, 6 Dec 2019 22:20:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726375AbfLFWUr (ORCPT ); Fri, 6 Dec 2019 17:20:47 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:58977 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726370AbfLFWUr (ORCPT ); Fri, 6 Dec 2019 17:20:47 -0500 X-Originating-IP: 157.36.241.251 Received: from localhost (unknown [157.36.241.251]) (Authenticated sender: me@yadavpratyush.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 46A94240006 for ; Fri, 6 Dec 2019 22:20:44 +0000 (UTC) Date: Sat, 7 Dec 2019 03:50:40 +0530 From: Pratyush Yadav To: git@vger.kernel.org Subject: [PATCH] git-gui: allow closing console window with Escape Message-ID: <20191206222040.toj4enbbbbamnrww@yadavpratyush.com> MIME-Version: 1.0 Content-Disposition: inline Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org It is often expected that popup windows like the console window be close-able with Esc. Signed-off-by: Pratyush Yadav --- This was requested by https://github.com/prati0100/git-gui/issues/17 lib/console.tcl | 1 + 1 file changed, 1 insertion(+) -- 2.24.0 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 [list destroy $w] } method exec {cmd {after {}}} {