Properly handle ex cmds with capital letters#11
Open
mattboehm wants to merge 1 commit intodbakker:masterfrom
Open
Properly handle ex cmds with capital letters#11mattboehm wants to merge 1 commit intodbakker:masterfrom
mattboehm wants to merge 1 commit intodbakker:masterfrom
Conversation
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.
Owner
|
Good point! But before merging it in I think I will first add a couple of unit tests this weekend to make sure it doesn't trip anything up. (Until now, what I've been doing is running vim-lint on a large, correct codebase to look for false positives but that's a bit dirty and getting repetitive :)) |
Contributor
Author
|
Sounds great! I did some brief checks, but definitely agree that this should be tested more heavily. |
|
There's also the special case of |
Contributor
Author
|
That's obnoxious as including all uppercase letters would raise errors on user/plugin defined commands. It may be best to ignore that one exception for now, but If you really wanted to, you could extend the regex to include |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
For example, before the change: cNext and cNexttttt both are captured as "c" which expands to "change" and we see no error.