diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-07-24 14:57:23 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-07-24 14:57:23 +0000 |
commit | 02cec671346445cdccd783dbabd4785f8d12703e (patch) | |
tree | 005160a86b5b6741a08d18003272637423962a0d /usr.bin/tmux | |
parent | c42ba807b68fc85c850deda68fbc87eae89e1495 (diff) |
Accept lowercase c- and m- prefix as well as C- and M-.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/key-string.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tmux/key-string.c b/usr.bin/tmux/key-string.c index 73e6f983e2b..3d261a6aff0 100644 --- a/usr.bin/tmux/key-string.c +++ b/usr.bin/tmux/key-string.c @@ -1,4 +1,4 @@ -/* $OpenBSD: key-string.c,v 1.3 2009/07/21 17:57:29 nicm Exp $ */ +/* $OpenBSD: key-string.c,v 1.4 2009/07/24 14:57:22 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -108,7 +108,7 @@ key_string_lookup_string(const char *string) return (string[0]); ptr = NULL; - if (string[0] == 'C' && string[1] == '-') + if ((string[0] == 'C' || string[0] == 'c') && string[1] == '-') ptr = string + 2; else if (string[0] == '^') ptr = string + 1; @@ -129,8 +129,8 @@ key_string_lookup_string(const char *string) return (key | KEYC_CTRL); return (KEYC_NONE); } - - if (string[0] == 'M' && string[1] == '-') { + + if ((string[0] == 'M' || string[0] == 'm') && string[1] == '-') { ptr = string + 2; if (ptr[0] == '\0') return (KEYC_NONE); |