Move Vim-range parsing stuff out of KateCmdLineEdit and into Kate Vim code where it can be shared
Review Request #111652 - Created July 23, 2013 and submitted
|Simon St James|
The code for parsing the leading range expressions in commands (e.g. "%", "'<,'>", ".,.+6" etc) is pretty complex, and is currently locked up inside KateCmdLineEdit. I also need it to be accessible from inside KateViEmulatedCommandBar, so rather than expose it through KateCmdLineEdit's very minimal API, I thought it might be better to move it all into KateViEmulatedCommandBar instead, since it is quite bulky and more properly belongs with the Kate Vim mode code. No functionality should be lost; these Vim-style ranges should still be usable in non-Vim mode.
No existing tests broken; some new tests added.
Again, the patch itself looks good to me. A remark though: If you want, you can create a new file for the class (or such helper classes). Otherwise, the size of the other files grows quite a bit, and having source code that spans several thousands of lines is usually increasingly scaring :-) At the same time, factoring this out to a new file would 'relax' the dependency of kateviewhelpers on kateviemulatedcommandbar.h a bit. Btw, I think it is very good that you write so many unit tests. It'll probably catch bugs in non-vi-mode related code in the future, too.