{"thread":{"id":"53451","subject":"[PATCH v3] git-gui: Handle Ctrl + BS/Del in the commit msg","startedAt":"2020-05-12T10:37:09Z","lastAt":"2020-05-21T13:01:02Z","messageCount":4,"participants":["Ismael Luceno","Pratyush Yadav"],"isPatch":true,"patchVersion":3,"patchTotal":null},"messages":[{"id":"397593","messageId":"20200512102806.GA20813@abuya.home","threadId":"53451","inReplyTo":null,"subject":"[PATCH v3] git-gui: Handle Ctrl + BS/Del in the commit msg","fromName":"Ismael Luceno","fromEmail":"ismael@iodev.co.uk","sentAt":"2020-05-12T10:28:06Z","receivedAt":"2020-05-12T10:37:09Z","isPatch":true,"sender":{"key":"ismael@iodev.co.uk","avatar":"https://avatars.githubusercontent.com/u/426980?v=4"},"body":"From: Ismael Luceno <ismael.luceno@tttech-auto.com>\n\n- Control+BackSpace: Delete word to the left of the cursor.\n- Control+Delete   : Delete word to the right of the cursor.\n\nOriginally introduced by BRIEF and Turbo Vision between 1985 and 1992,\nthey were adopted by most CUA-Compliant UIs, including those of: OS/2,\nWindows, Mac OS, Qt, GTK, Open/Libre Office, Gecko, and GNU Emacs.\n\nIn both cases Tk already implements the functionality bound to other key\ncombination, so we use that.\n\nGraphical examples:\n\nDeleting to the left:\n        v------ pointer\nX_WORD____X\n  ^-----^------ selection\n\nDeleting to the right:\n  v--------- pointer\nX_WORD_X\n  ^--^------ selection\n\nSigned-off-by: Ismael Luceno <ismael.luceno@tttech-auto.com>\n\n---\nI'm re-submitting the patch after >1 year.\n\nCC: Junio C Hamano <gitster@pobox.com>\nCC: \"brian m. carlson\" <sandals@crustytoothpaste.net>\nCC: Pat Thoyts <patthoyts@users.sourceforge.net>\nCC: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n\nNotes:\n    Changes since v2:\n    - Reimplemented via existing events, which correctly delete spaces.\n    - Further improved commit message.\n    \n    Changes since v1:\n    - Improved commit message.\n\n git-gui/git-gui.sh | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh\nindex 6de74ce639..c4e0270626 100755\n--- a/git-gui/git-gui.sh\n+++ b/git-gui/git-gui.sh\n@@ -3812,6 +3812,8 @@ bind $ui_comm <$M1B-Key-KP_Subtract> {show_less_context;break}\n bind $ui_comm <$M1B-Key-equal> {show_more_context;break}\n bind $ui_comm <$M1B-Key-plus> {show_more_context;break}\n bind $ui_comm <$M1B-Key-KP_Add> {show_more_context;break}\n+bind $ui_comm <Control-Key-BackSpace> {event generate %W <Meta-Delete>;break}\n+bind $ui_comm <Control-Key-Delete> {event generate %W <Meta-d>;break}\n \n bind $ui_diff <$M1B-Key-x> {tk_textCopy %W;break}\n bind $ui_diff <$M1B-Key-X> {tk_textCopy %W;break}\n-- \n2.19.1\n"},{"id":"397597","messageId":"20200512130235.2vimhqmmzbib3k2s@yadavpratyush.com","threadId":"53451","inReplyTo":"20200512102806.GA20813@abuya.home","subject":"Re: [PATCH v3] git-gui: Handle Ctrl + BS/Del in the commit msg","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2020-05-12T13:02:35Z","receivedAt":"2020-05-12T13:02:48Z","isPatch":true,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"Hi Ismael,\n\nOn 12/05/20 12:28PM, Ismael Luceno wrote:\n> From: Ismael Luceno <ismael.luceno@tttech-auto.com>\n> \n> - Control+BackSpace: Delete word to the left of the cursor.\n> - Control+Delete   : Delete word to the right of the cursor.\n> \n> Originally introduced by BRIEF and Turbo Vision between 1985 and 1992,\n> they were adopted by most CUA-Compliant UIs, including those of: OS/2,\n> Windows, Mac OS, Qt, GTK, Open/Libre Office, Gecko, and GNU Emacs.\n> \n> In both cases Tk already implements the functionality bound to other key\n> combination, so we use that.\n> \n> Graphical examples:\n> \n> Deleting to the left:\n>         v------ pointer\n> X_WORD____X\n>   ^-----^------ selection\n> \n> Deleting to the right:\n>   v--------- pointer\n> X_WORD_X\n>   ^--^------ selection\n> \n> Signed-off-by: Ismael Luceno <ismael.luceno@tttech-auto.com>\n> \n> ---\n> I'm re-submitting the patch after >1 year.\n> \n> CC: Junio C Hamano <gitster@pobox.com>\n> CC: \"brian m. carlson\" <sandals@crustytoothpaste.net>\n> CC: Pat Thoyts <patthoyts@users.sourceforge.net>\n> CC: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n> \n> Notes:\n>     Changes since v2:\n>     - Reimplemented via existing events, which correctly delete spaces.\n>     - Further improved commit message.\n>     \n>     Changes since v1:\n>     - Improved commit message.\n> \n>  git-gui/git-gui.sh | 2 ++\n>  1 file changed, 2 insertions(+)\n> \n> diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh\n> index 6de74ce639..c4e0270626 100755\n> --- a/git-gui/git-gui.sh\n> +++ b/git-gui/git-gui.sh\n\nYou based the patch on top of the Git tree. Since Git Gui is maintained \nseparate from Git, patches are expected to be based on top of the Git \nGui tree [0]. I fixed it up and applied the patch on my tree.\n\n> @@ -3812,6 +3812,8 @@ bind $ui_comm <$M1B-Key-KP_Subtract> {show_less_context;break}\n>  bind $ui_comm <$M1B-Key-equal> {show_more_context;break}\n>  bind $ui_comm <$M1B-Key-plus> {show_more_context;break}\n>  bind $ui_comm <$M1B-Key-KP_Add> {show_more_context;break}\n> +bind $ui_comm <Control-Key-BackSpace> {event generate %W <Meta-Delete>;break}\n> +bind $ui_comm <Control-Key-Delete> {event generate %W <Meta-d>;break}\n\nDon't use \"Control\" directly to maintain compatibility with MacOS. Use \n$M1B like the surrounding code does. I fixed it up locally, so no need \nto send in a new version. You can find the fixed up version here [1]. \nTest it if you'd like.\n\nWill merge it in. Thanks.\n  \n[0] https://github.com/prati0100/git-gui/\n[1] https://github.com/prati0100/git-gui/tree/il/ctrl-bs-del\n\n-- \nRegards,\nPratyush Yadav\n"},{"id":"397599","messageId":"20200512132832.GB20813@abuya.home","threadId":"53451","inReplyTo":"20200512130235.2vimhqmmzbib3k2s@yadavpratyush.com","subject":"Re: [PATCH v3] git-gui: Handle Ctrl + BS/Del in the commit msg","fromName":"Ismael Luceno","fromEmail":"ismael@iodev.co.uk","sentAt":"2020-05-12T13:28:32Z","receivedAt":"2020-05-12T13:27:48Z","isPatch":true,"sender":{"key":"ismael@iodev.co.uk","avatar":"https://avatars.githubusercontent.com/u/426980?v=4"},"body":"On 12/May/2020 18:32, Pratyush Yadav wrote:\n> Hi Ismael,\n> \n> On 12/05/20 12:28PM, Ismael Luceno wrote:\n> > From: Ismael Luceno <ismael.luceno@tttech-auto.com>\n> > \n> > - Control+BackSpace: Delete word to the left of the cursor.\n> > - Control+Delete   : Delete word to the right of the cursor.\n> > \n> > Originally introduced by BRIEF and Turbo Vision between 1985 and 1992,\n> > they were adopted by most CUA-Compliant UIs, including those of: OS/2,\n> > Windows, Mac OS, Qt, GTK, Open/Libre Office, Gecko, and GNU Emacs.\n> > \n> > In both cases Tk already implements the functionality bound to other key\n> > combination, so we use that.\n> > \n> > Graphical examples:\n> > \n> > Deleting to the left:\n> >         v------ pointer\n> > X_WORD____X\n> >   ^-----^------ selection\n> > \n> > Deleting to the right:\n> >   v--------- pointer\n> > X_WORD_X\n> >   ^--^------ selection\n> > \n> > Signed-off-by: Ismael Luceno <ismael.luceno@tttech-auto.com>\n> > \n> > ---\n> > I'm re-submitting the patch after >1 year.\n> > \n> > CC: Junio C Hamano <gitster@pobox.com>\n> > CC: \"brian m. carlson\" <sandals@crustytoothpaste.net>\n> > CC: Pat Thoyts <patthoyts@users.sourceforge.net>\n> > CC: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n> > \n> > Notes:\n> >     Changes since v2:\n> >     - Reimplemented via existing events, which correctly delete spaces.\n> >     - Further improved commit message.\n> >     \n> >     Changes since v1:\n> >     - Improved commit message.\n> > \n> >  git-gui/git-gui.sh | 2 ++\n> >  1 file changed, 2 insertions(+)\n> > \n> > diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh\n> > index 6de74ce639..c4e0270626 100755\n> > --- a/git-gui/git-gui.sh\n> > +++ b/git-gui/git-gui.sh\n> \n> You based the patch on top of the Git tree. Since Git Gui is maintained \n> separate from Git, patches are expected to be based on top of the Git \n> Gui tree [0]. I fixed it up and applied the patch on my tree.\n> \n> > @@ -3812,6 +3812,8 @@ bind $ui_comm <$M1B-Key-KP_Subtract> {show_less_context;break}\n> >  bind $ui_comm <$M1B-Key-equal> {show_more_context;break}\n> >  bind $ui_comm <$M1B-Key-plus> {show_more_context;break}\n> >  bind $ui_comm <$M1B-Key-KP_Add> {show_more_context;break}\n> > +bind $ui_comm <Control-Key-BackSpace> {event generate %W <Meta-Delete>;break}\n> > +bind $ui_comm <Control-Key-Delete> {event generate %W <Meta-d>;break}\n> \n> Don't use \"Control\" directly to maintain compatibility with MacOS. Use \n> $M1B like the surrounding code does. I fixed it up locally, so no need \n> to send in a new version. You can find the fixed up version here [1]. \n> Test it if you'd like.\n> \n> Will merge it in. Thanks.\n\nThanks.\n"},{"id":"398356","messageId":"20200521130046.g4qwvyobllaj6xxx@yadavpratyush.com","threadId":"53451","inReplyTo":"20200512102806.GA20813@abuya.home","subject":"Re: [PATCH v3] git-gui: Handle Ctrl + BS/Del in the commit msg","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2020-05-21T13:00:46Z","receivedAt":"2020-05-21T13:01:02Z","isPatch":true,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"On 12/05/20 12:28PM, Ismael Luceno wrote:\n> From: Ismael Luceno <ismael.luceno@tttech-auto.com>\n> \n> - Control+BackSpace: Delete word to the left of the cursor.\n> - Control+Delete   : Delete word to the right of the cursor.\n> \n> Originally introduced by BRIEF and Turbo Vision between 1985 and 1992,\n> they were adopted by most CUA-Compliant UIs, including those of: OS/2,\n> Windows, Mac OS, Qt, GTK, Open/Libre Office, Gecko, and GNU Emacs.\n> \n> In both cases Tk already implements the functionality bound to other key\n> combination, so we use that.\n> \n> Graphical examples:\n> \n> Deleting to the left:\n>         v------ pointer\n> X_WORD____X\n>   ^-----^------ selection\n> \n> Deleting to the right:\n>   v--------- pointer\n> X_WORD_X\n>   ^--^------ selection\n> \n> Signed-off-by: Ismael Luceno <ismael.luceno@tttech-auto.com>\n\nMerged to git-gui/master.\n \n\n-- \nRegards,\nPratyush Yadav\n"}]}