From ab5b2fb814b401fe8a472c91470de8df58171266 Mon Sep 17 00:00:00 2001 From: Matthew Boehm Date: Wed, 20 Nov 2013 02:02:48 -0500 Subject: [PATCH] Properly handle ex cmds with capital letters ex commands can have capital letters after their first character linecmd's regex should capture this. Also, functions should not call lower() on a command as it's case-sensitive. --- vimlint/ex.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vimlint/ex.py b/vimlint/ex.py index ca7cbbb..571d34b 100644 --- a/vimlint/ex.py +++ b/vimlint/ex.py @@ -166,14 +166,14 @@ def expand(excmd): exaliases[current] = complete current += ch - return exaliases.get(excmd.lower(), None) + return exaliases.get(excmd, None) def linecmd(line): try: - cmd = re.match('\s*:*%?([a-z]+|!)', line).group(1) + cmd = re.match('\s*:*%?(([a-z][a-zA-Z]*)|!)', line).group(1) expanded = expand(cmd) - return expanded if expanded else cmd.lower() + return expanded if expanded else cmd except: pass