forked from qt-creator/qt-creator
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:
2
src/plugins/fakevim/fakevimhandler.cpp
Executable file → Normal file
2
src/plugins/fakevim/fakevimhandler.cpp
Executable file → Normal 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()) {
|
||||
|
||||
Reference in New Issue
Block a user