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

Modified Files:
        key-string.c 
Log Message:
Make bind-key accept characters with the top-bit-set and print them as octal.


Index: key-string.c
===================================================================
RCS file: /cvsroot/tmux/tmux/key-string.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- key-string.c        3 Jan 2011 23:32:04 -0000       1.35
+++ key-string.c        22 Jan 2011 22:31:09 -0000      1.36
@@ -147,7 +147,7 @@
        /* Is this a standard ASCII key? */
        if (string[1] == '\0') {
                key = (u_char) string[0];
-               if (key < 32 || key > 126)
+               if (key < 32 || key == 127 || key > 255)
                        return (KEYC_NONE);
        } else {
                /* Otherwise look the key up in the table. */
@@ -213,7 +213,7 @@
        }
 
        /* Invalid keys are errors. */
-       if (key >= 127)
+       if (key == 127 || key > 255)
                return (NULL);
 
        /* Check for standard or control key. */
@@ -225,7 +225,9 @@
        } else if (key >= 32 && key <= 126) {
                tmp[0] = key;
                tmp[1] = '\0';
-       }
+       } else if (key >= 128)
+               xsnprintf(tmp, sizeof tmp, "\\%o", key);
+
        strlcat(out, tmp, sizeof out);
        return (out);
 }


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to