From 02cec671346445cdccd783dbabd4785f8d12703e Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 24 Jul 2009 14:57:23 +0000 Subject: Accept lowercase c- and m- prefix as well as C- and M-. --- usr.bin/tmux/key-string.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr.bin/tmux') 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 @@ -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); -- cgit v1.2.3