Does this issue occur when all extensions are disabled?: Yes
No extensions installed.
- VS Code Version: 1.99.3
- OS Version: Windows 11 24H2
When executing search and replace by clicking replace button the cursor does not move to the next match when the replace string is the newline followed by the search string. Instead, the first match is replaced repeatedly, preventing sequential replacements.
Steps to Reproduce:
Code:
text text text
- Set cursor before first text.
- CTRL+H.
- Enter search string "text" without quotes.
- Enter replace string "
text1" without quotes. Replace string starts with newline. newline via SHIFT+ENTER.
- Click replace button 3 times.
- Expected result: "
text1
text1
text1"
- Actual result is"
text111 text text" without quotes.
Looks like the cursor sticks in the original line by ignoring the inserted newline causing the same match to be replaced repeatedly instead of progressing to the next occurrence.
Hitting "replace all" however works flawlessly.