Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Regexp subexpression replace doesn't work in Replace All #5770

Closed
marcelgerber opened this issue Oct 30, 2013 · 6 comments
Closed

Regexp subexpression replace doesn't work in Replace All #5770

marcelgerber opened this issue Oct 30, 2013 · 6 comments

Comments

@marcelgerber
Copy link
Contributor

Related to #5275 and the PR #5295.

  1. Create a new file with the content below.
  2. Set the cursor to line 1, beginning of the line
  3. Press Ctrl+H to start replace mode
  4. Enter /<(.+)>/ and <$1 test>
  5. Select All in the modal bar
  6. Leave everything selected and press Replace

Result:

<div></div test>
<div></div test>
<div></div test>

Expected:

<div></div test>
<span></span test>
<h1></h1 test>

Content of the file:

<div></div>
<span></span>
<h1></h1>

Sprint 33 dev @4a840ecc1

@njx

@njx
Copy link

njx commented Oct 30, 2013

Hmmm, I thought I tested that case. Let me see what's up.

@njx
Copy link

njx commented Oct 30, 2013

Ugh. Not sure why I didn't catch this. I must have tested a case where the substituted item happened to be the same each time.

@njx
Copy link

njx commented Oct 30, 2013

@SAplayer I have a potential fix up at #5772. We're right at the end of the sprint though so I'm not sure if we're going to take it, or try to back out the feature. If you have a chance to look at it ASAP it would be good to know if you see any problems with it.

@njx
Copy link

njx commented Oct 30, 2013

Oh, I just saw your pull request. It looks basically the same as mine, so that's a good sign :)

@marcelgerber
Copy link
Contributor Author

Yes, I think we should wait for the next sprint to merge one of these bugs, so we have more time to see if any bugs occur.

@marcelgerber
Copy link
Contributor Author

Confirmed fixed by #5772.
Closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants