Repro steps:
- Open the stock demo at Try CodeMirror
- Add the output:
* [[Help:Foo|Barrrrrrrrrrr]]
* [[Help:Bazzzz|Qux]]
* [[Help:Qux|Fooo]]
* [[Help:Barrrrrr|Baz]]
- Open the search dialog and use the query
\[\[Help:(.*)\|(.*)\]\]
with the “regexp” option checked - Use the replacement text
{{Help|$1|$2}}
- Hit the “replace” button four times
Expected:
After each replacement, the next match should be highlighted, and clicking “replace” again should replace that match. Four clicks in this example should replace all four lines like so:
* {{Help|Foo|Barrrrrrrrrrr}}
* {{Help|Bazzzz|Qux}}
* {{Help|Qux|Fooo}}
* {{Help|Barrrrrr|Baz}}
Observed:
CodeMirror apparently does not take into account the changes to the document as a result of the replacement. You have to click “replace” repeatedly to force a new match, and since the cursor/selection was not correctly updated, the next occurrence will be the third line and not the second line.
I.e. the four clicks produce:
* {{Help|Foo|Barrrrrrrrrrr}}
* [[Help:Bazzzz|Qux]]
* {{Help|Qux|Fooo}}
* [[Help:Barrrrrr|Baz]]