We need to parse leading range expressions (e.g. "%", "'<,'>", ".,.+6" etc) in KateViEmulatedCommandBar when parsing a sed replace command (see motivating test cases), and the (fairly complex) code to do this is currently locked up in KateCmdLineEdit.
author Simon St James
()
committer Simon St James
()
commit 0cba7838986afaa5c1ab5e8b714bca517bd25d0f
tree f18525c3e172f400349c8d107a54834bcc5f7bce
parent 4a00bf918a062e8db7408c1eeee0c457df3f6ef8
We need to parse leading range expressions (e.g. "%", "'<,'>", ".,.+6" etc) in KateViEmulatedCommandBar when parsing a sed replace command (see motivating test cases), and the (fairly complex) code to do this is currently locked up in KateCmdLineEdit.

Rather than expose it via KateCmdLineEdit's (nicely minimal) API, it seems a better idea to just move it all into KateViEmulatedCommandBar: as Vim-specific code, it seems to belong there more.

Do this, and then use it with the ctrl-f & ctrl-d stuff to be able to clear the "find"/ "replace" portions of a sed expression even when the command has a leading range expression.

Vim-style ranges should still be usable in non-Vim mode.

REVIEW:111652
part/view/kateviewhelpers.cpp
part/view/kateviewhelpers.h
part/vimode/kateviemulatedcommandbar.cpp
part/vimode/kateviemulatedcommandbar.h
tests/vimode_test.cpp