From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id DF6581F463 for ; Wed, 18 Dec 2019 19:58:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727695AbfLRT6l (ORCPT ); Wed, 18 Dec 2019 14:58:41 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:41123 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727634AbfLRT6e (ORCPT ); Wed, 18 Dec 2019 14:58:34 -0500 X-Originating-IP: 157.36.178.182 Received: from localhost.localdomain (unknown [157.36.178.182]) (Authenticated sender: me@yadavpratyush.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 23CF760002; Wed, 18 Dec 2019 19:58:30 +0000 (UTC) From: Pratyush Yadav To: Cc: Vasili Novikov Subject: [PATCH v2] git-gui: allow closing console window with Escape Date: Thu, 19 Dec 2019 01:28:09 +0530 Message-Id: <20191218195809.7658-1-me@yadavpratyush.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org 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 --- Changes in v2: - Only allow closing the window on Escape when the command is done. lib/console.tcl | 2 ++ 1 file changed, 2 insertions(+) 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 "destroy $w;break" } method _sb_set {sb orient first last} { -- 2.24.1