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

Only use regex lookbehind where supported #3525

Merged
merged 4 commits into from
Apr 8, 2019

Conversation

jkillian
Copy link
Contributor

@jkillian jkillian commented Feb 26, 2019

What this PR does / why we need it:

Users on older versions of VSCode were hitting bugs because of lookbehinds in the camel case motion regex. This should fix the issue for those users.

Which issue(s) this PR fixes

Fixes #3522

Special notes for your reviewer:
I didn't get to test this myself on an older version of VSCode. But I think it should work?

@julie-is-late
Copy link

This is very similar to what I was testing. Looks fine. Special note that if a user is building vscodevim on an older branch that some test cases will fail, but seems fine to just say that is disallowed.

@jkillian
Copy link
Contributor Author

jkillian commented Mar 5, 2019

Closing this since nobody has complained that they can't upgrade VSCode yet. Will keep the branch around for now though in case it becomes necessary

@CompuIves
Copy link

CompuIves commented Apr 3, 2019

Hey! We're using VSCodeVIM inside CodeSandbox (https://codesandbox.io/s/new), which runs VSCode + extensions. For our VIM Mode we use VSCodeVIM (thanks for building this!).

This worked great so far, but we found out that lookbehind regexpressions are not supported in Firefox. I can imagine that this is a very unusual request but would you be open to a PR that adds the lookbehind check and disables it if it detects Firefox/Safari?

@jkillian
Copy link
Contributor Author

jkillian commented Apr 3, 2019

reopening for consideration since it seems like there are some legit use cases

@jkillian jkillian reopened this Apr 3, 2019
@jpoon jpoon merged commit 5a949b6 into VSCodeVim:master Apr 8, 2019
@TheJoeSchr
Copy link

is this working? I'm trying to access code-server via firefox reality and it gives me this error.

would be really cool if I could code in VR and so far this is the only roadblock :(

anyways thanks for building VSCodeVim, it's really fine!

@shritesh
Copy link

This was removed again in 1d273eb#diff-4eb584e50b8970dfd9f200f6d934f418

@DAddYE
Copy link

DAddYE commented Jul 20, 2020

This was removed again in 1d273eb#diff-4eb584e50b8970dfd9f200f6d934f418

I'm using vscode 1.46.1 through code-server on ipad and I'm getting:

Activating extension 'vscodevim.vim' failed: Invalid regular expression: invalid group specifier name.
_logMessageInConsole — abstractExtensionService.ts:396
_logOrShowMessage — abstractExtensionService.ts:410
(anonymous function) — mainThreadExtensionService.ts:70
asyncFunctionResume
_invokeHandler — rpcProtocol.ts:387
_receiveRequest — rpcProtocol.ts:303
_receiveOneMessage — rpcProtocol.ts:230
fire — event.ts:587
(anonymous function) — webWorkerExtensionHostStarter.ts:70
console.ts:137

@J-Fields
Copy link
Member

Ah, I hadn't considered us running in the browser when I removed that. I'll fix it momentarily.

J-Fields added a commit that referenced this pull request Jul 22, 2020
This reverts commit 1d273eb.

Turns out we need this check for VSCodeVim in older browsers.

Refs #3525
@DAddYE
Copy link

DAddYE commented Jul 22, 2020

Ah, I hadn't considered us running in the browser when I removed that. I'll fix it momentarily.

Thanks so much guys!

@DAddYE
Copy link

DAddYE commented Jul 24, 2020

Ah, I hadn't considered us running in the browser when I removed that. I'll fix it momentarily.

Seems is still not working, I tested from master and still has errors with some grouped regex.
I'll try in the next few days to see if I can profile/debug the extension, because currently the inspector isn't super helpful.

@J-Fields
Copy link
Member

@DAddYE Just created #5072, I'll try to resolve when I have a chance

@Immortalin
Copy link

@J-Fields any luck?

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.

Activating extension 'vscodevim.vim' failed: Invalid regular expression
9 participants