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

Incorrect regex substitution (search and replace) #188

Open
lebigot opened this issue Sep 8, 2024 · 0 comments · May be fixed by #189
Open

Incorrect regex substitution (search and replace) #188

lebigot opened this issue Sep 8, 2024 · 0 comments · May be fixed by #189

Comments

@lebigot
Copy link

lebigot commented Sep 8, 2024

Substituting all instances of a character with an empty string doesn't work properly, when this character comes in multiple consecutive copies.

Here is an example, that can be reproduced in the current sandbox:

  1. Type xxxWORDxx on a line.
  2. Keep the cursor on the line, in normal mode.
  3. Try to remove all x characters in the line with the command :s/x//g.

Observed: the line now contains xWORDx. The last consecutive character is not removed (for each group of x characters).

Expected: the line should contain WORD, instead (as in the original vim and as in the CodeMirror 5 online editor)

@nightwing nightwing linked a pull request Sep 8, 2024 that will close this issue
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 a pull request may close this issue.

1 participant