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-Status: No, score=-2.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id B2F461FA04 for ; Tue, 12 May 2020 13:02:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729645AbgELNCr (ORCPT ); Tue, 12 May 2020 09:02:47 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:34111 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725923AbgELNCr (ORCPT ); Tue, 12 May 2020 09:02:47 -0400 Received: from localhost (unknown [106.76.68.114]) (Authenticated sender: me@yadavpratyush.com) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 6F913100017; Tue, 12 May 2020 13:02:42 +0000 (UTC) Date: Tue, 12 May 2020 18:32:35 +0530 From: Pratyush Yadav To: Ismael Luceno Cc: "git@vger.kernel.org" , Junio C Hamano , "brian m. carlson" , Pat Thoyts , Johannes Schindelin Subject: Re: [PATCH v3] git-gui: Handle Ctrl + BS/Del in the commit msg Message-ID: <20200512130235.2vimhqmmzbib3k2s@yadavpratyush.com> References: <20200512102806.GA20813@abuya.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200512102806.GA20813@abuya.home> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Ismael, On 12/05/20 12:28PM, Ismael Luceno wrote: > From: Ismael Luceno > > - Control+BackSpace: Delete word to the left of the cursor. > - Control+Delete : Delete word to the right of the cursor. > > Originally introduced by BRIEF and Turbo Vision between 1985 and 1992, > they were adopted by most CUA-Compliant UIs, including those of: OS/2, > Windows, Mac OS, Qt, GTK, Open/Libre Office, Gecko, and GNU Emacs. > > In both cases Tk already implements the functionality bound to other key > combination, so we use that. > > Graphical examples: > > Deleting to the left: > v------ pointer > X_WORD____X > ^-----^------ selection > > Deleting to the right: > v--------- pointer > X_WORD_X > ^--^------ selection > > Signed-off-by: Ismael Luceno > > --- > I'm re-submitting the patch after >1 year. > > CC: Junio C Hamano > CC: "brian m. carlson" > CC: Pat Thoyts > CC: Johannes Schindelin > > Notes: > Changes since v2: > - Reimplemented via existing events, which correctly delete spaces. > - Further improved commit message. > > Changes since v1: > - Improved commit message. > > git-gui/git-gui.sh | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh > index 6de74ce639..c4e0270626 100755 > --- a/git-gui/git-gui.sh > +++ b/git-gui/git-gui.sh You based the patch on top of the Git tree. Since Git Gui is maintained separate from Git, patches are expected to be based on top of the Git Gui tree [0]. I fixed it up and applied the patch on my tree. > @@ -3812,6 +3812,8 @@ bind $ui_comm <$M1B-Key-KP_Subtract> {show_less_context;break} > bind $ui_comm <$M1B-Key-equal> {show_more_context;break} > bind $ui_comm <$M1B-Key-plus> {show_more_context;break} > bind $ui_comm <$M1B-Key-KP_Add> {show_more_context;break} > +bind $ui_comm {event generate %W ;break} > +bind $ui_comm {event generate %W ;break} Don't use "Control" directly to maintain compatibility with MacOS. Use $M1B like the surrounding code does. I fixed it up locally, so no need to send in a new version. You can find the fixed up version here [1]. Test it if you'd like. Will merge it in. Thanks. [0] https://github.com/prati0100/git-gui/ [1] https://github.com/prati0100/git-gui/tree/il/ctrl-bs-del -- Regards, Pratyush Yadav