Update of /cvsroot/tmux/tmux
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv2984

Modified Files:
        key-string.c 
Log Message:
Allow C-Space to work correctly once again, and forbid nonsensical combinations 
such as C-Enter or C-Escape.


Index: key-string.c
===================================================================
RCS file: /cvsroot/tmux/tmux/key-string.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- key-string.c        14 May 2010 14:21:07 -0000      1.32
+++ key-string.c        5 Jun 2010 06:27:19 -0000       1.33
@@ -149,29 +149,28 @@
                key = (u_char) string[0];
                if (key < 32 || key > 126)
                        return (KEYC_NONE);
+       } else {
+               /* Otherwise look the key up in the table. */
+               key = key_string_search_table(string);
+               if (key == KEYC_NONE)
+                       return (KEYC_NONE);
+       }
 
-               /* Convert the standard control keys. */
-               if (modifiers & KEYC_CTRL) {
-                       if (key >= 97 && key <= 122)
-                               key -= 96;
-                       else if (key >= 64 && key <= 95)
-                               key -= 64;
-                       else if (key == 32)
-                               key = 0;
-                       else if (key == 63)
-                               key = KEYC_BSPACE;
-                       else
-                               return (KEYC_NONE);
-                       modifiers &= ~KEYC_CTRL;
-               }
-
-               return (key | modifiers);
+       /* Convert the standard control keys. */
+       if (key < KEYC_BASE && (modifiers & KEYC_CTRL)) {
+               if (key >= 97 && key <= 122)
+                       key -= 96;
+               else if (key >= 64 && key <= 95)
+                       key -= 64;
+               else if (key == 32)
+                       key = 0;
+               else if (key == 63)
+                       key = KEYC_BSPACE;
+               else
+                       return (KEYC_NONE);
+               modifiers &= ~KEYC_CTRL;
        }
 
-       /* Otherwise look the key up in the table. */
-       key = key_string_search_table(string);
-       if (key == KEYC_NONE)
-               return (KEYC_NONE);
        return (key | modifiers);
 }
 


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to