ie. when the replace text contains the original text the loop doesn't terminate because the original text doesn't disappear
The new issue is that we may not actually replace everything. Tomorrow.
It's a QScintilla bug, probably fixed in the next release. I'll close the issue if I can confirm the upstream fix.