fakevim: correct cursor handling for ex commands

ex commands might depend on current cursor position and might modifiy
it, thus set the editor's text cursor to fakevim's before initiating the
command and use the editor's text cursor afterwards

Merge-request: 101
Reviewed-by: hjk <qtc-committer@nokia.com>
This commit is contained in:
Martin Aumüller
2010-01-21 18:19:58 +01:00
committed by hjk
parent 1e46b6232b
commit 58571da7a4

2
src/plugins/fakevim/fakevimhandler.cpp Executable file → Normal file
View File

@@ -2058,7 +2058,9 @@ EventResult FakeVimHandler::Private::handleMiniBufferModes(int key, int unmodifi
if (!m_commandBuffer.isEmpty()) {
m_commandHistory.takeLast();
m_commandHistory.append(m_commandBuffer);
EDITOR(setTextCursor(m_tc));
handleExCommand(m_commandBuffer);
m_tc = EDITOR(textCursor());
leaveVisualMode();
}
} else if (unmodified == Key_Return && isSearchMode()) {