Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VIM-855 Fix regexp character class bugs #59

Merged

Conversation

dezgeg
Copy link
Contributor

@dezgeg dezgeg commented Dec 8, 2014

Fixes https://youtrack.jetbrains.com/issue/VIM-855

Previously strchr and istrchr didn't consider NUL chars as end-of-string
terminators. This caused problems in regexps using character classes:
a regexp like "[^a]bc" would be effectively treated as "[^abc]bc" - i.e.
some literal characters from the rest of the pattern would accidentally be
included in the character class.

Previously strchr and istrchr didn't consider NUL chars as end-of-string
terminators. This caused problems in regexps using character classes:
a regexp like "[^a]bc" would be effectively treated as "[^abc]bc" - i.e.
some literal characters from the rest of the pattern would accidentally be
included in the character class.
@xxv
Copy link

xxv commented Dec 9, 2014

Would this issue affect negative zero-width lookbehind operators too? I'm getting a similar issue with:

aa..\(bb\)\@<!cc

where it matches aabbcc (and doesn't in vim). If this is unrelated, I'll file a seprate ticket.

@dezgeg
Copy link
Contributor Author

dezgeg commented Dec 9, 2014

It's most likely a different issue.

@xxv
Copy link

xxv commented Dec 9, 2014

Second issue tracked in VIM-856.

@vlasovskikh vlasovskikh merged commit 7746a26 into JetBrains:master Jan 20, 2015
@vlasovskikh
Copy link
Contributor

@dezgeg Thanks for your pull request!

@dezgeg dezgeg deleted the fixes/vim-855-char-class-regression branch January 26, 2015 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants