Re: [PATCH v2] git-gui: Handle Ctrl + BS/Del in the commit msg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ismael Luceno <ismael@xxxxxxxxxxx> writes:

> - 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 <ismael@xxxxxxxxxxx>
> ---
>
> Notes:
>     Changes since v1:
>     - Improved commit message.

I do not use git-gui, but as a bystander, the intent of the change
sounds sane.  deleting from the insertion cursor to the end of the
word where the insertion cursor is looks like the right way to
delete the word to the right of the cursor.  I am not sure if going
back by one character from where the current insertion cursor is and
further go back to the wordstart would give the beginning of the
word to the left of the cursor, though.

A larger issue is that we haven't heard from Pat, who has been
helping git-gui.sh maintenance, for quite a while, so we'd need to
find a volunteer to act as a replacement maintainer.  If you are
willing to, that would be great ;-)

Thanks.


>  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 <Control-Key-BackSpace> {%W delete {insert -1 chars wordstart} insert;break}
> +bind $ui_comm <Control-Key-Delete> {%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}



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux