Replace the guts of SedReplace with KateRegexpSearch
Review Request #111859 - Created Aug. 3, 2013 and submitted
|Simon St James|
This is a bit of a transient request, as I'm going to be doing a further significant re-working of this bit of code soon-ish*, but it's an important stepping stone on the way :) This patch cuts out SedReplaces' homespun search and replace code in favour of one based on KateRegexpSearch. This leads to less code and also some extra features, including multi-line searches in SedReplace, and the usage of \U and \L to upper/ lower-case captured replacement expressions. There is an accompanying regression test suite in VimModeTests, but none of these improvements are specific to Vim mode. * I'm hoping to rework it further to support interactive search & replace - this will be for Vim mode only, for the time being, but should be easily extended to non-Vim mode if anyone wants to tackle that task.
No automated tests broken; added some new regression tests (via VimModeTests).
Lots of code removed, very good. But when you say no tests fail - have there been any tests for this at all? Maybe it's not tested and thats why nothing breaks? Alternatively of course it does work as intended :) Anyhow, I trust you tested this so from my side this looks good.