From patchwork Sat Feb 16 03:10:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ismael Luceno X-Patchwork-Id: 10816123 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 83D4D1390 for ; Sat, 16 Feb 2019 03:11:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E21B2FAA9 for ; Sat, 16 Feb 2019 03:11:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 614B12FAB6; Sat, 16 Feb 2019 03:11:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7EBC32FAA9 for ; Sat, 16 Feb 2019 03:11:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727542AbfBPDLa (ORCPT ); Fri, 15 Feb 2019 22:11:30 -0500 Received: from [193.29.56.124] ([193.29.56.124]:36908 "EHLO iodev.co.uk" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1726232AbfBPDLa (ORCPT ); Fri, 15 Feb 2019 22:11:30 -0500 From: Ismael Luceno To: git@vger.kernel.org Cc: "brian m. carlson" , Pat Thoyts , Ismael Luceno Subject: [PATCH v2] git-gui: Handle Ctrl + BS/Del in the commit msg Date: Sat, 16 Feb 2019 04:10:52 +0100 Message-Id: <20190216031051.8859-1-ismael@iodev.co.uk> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP - 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. Signed-off-by: Ismael Luceno --- Notes: Changes since v1: - Improved commit message. git-gui.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git-gui.sh b/git-gui.sh index 5bc21b878d41..e00d9a345294 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -3788,6 +3788,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 {%W delete {insert -1 chars wordstart} insert;break} +bind $ui_comm {%W delete insert {insert wordend};break} bind $ui_diff <$M1B-Key-x> {tk_textCopy %W;break} bind $ui_diff <$M1B-Key-X> {tk_textCopy %W;break}