From: Benno Schulenberg Date: Fri, 13 Jun 2014 14:58:02 +0000 (+0000) Subject: Not treating the holding of both Control and Meta the same as only Control. X-Git-Tag: v2.3.5~97 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=cd59a646e67c789c42799c60279f1f7151eb03a9;p=nano.git Not treating the holding of both Control and Meta the same as only Control. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4963 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 783e868d..6bfb2214 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ * src/nano.c (do_mouse): Clicking on the titlebar or the statusbar should not break a series of ^Ks, thus result must not be zero. * src/nano.c (do_input): A toggle should not break a series of ^Ks. + * src/winio.c (get_shortcut): Do not treat holding both Control and + Meta the same as holding only Control. 2014-06-11 Benno Schulenberg * src/winio.c (get_mouseinput): Produce the correct return value for diff --git a/src/winio.c b/src/winio.c index d7c7dea3..87aad692 100644 --- a/src/winio.c +++ b/src/winio.c @@ -1773,11 +1773,9 @@ const sc *get_shortcut(int menu, int *kbinput, bool *meta_key) fprintf(stderr, "get_shortcut(): kbinput = %d, meta_key = %s -- ", *kbinput, *meta_key ? "TRUE" : "FALSE"); #endif - /* Check for shortcuts. */ for (s = sclist; s != NULL; s = s->next) { - if ((menu & s->menu) - && ((s->type == META && *meta_key == TRUE && *kbinput == s->seq) - || (s->type != META && *kbinput == s->seq))) { + if ((menu & s->menu) && *kbinput == s->seq + && *meta_key == (s->type == META)) { #ifdef DEBUG fprintf (stderr, "matched seq \"%s\", and btw meta was %d (menu is %x from %x)\n", s->keystr, *meta_key, menu, s->menu);