From 58571da7a42952ac41be9f843cd53378d4b9f2c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Aum=C3=BCller?= <aumuell@reserv.at> Date: Thu, 21 Jan 2010 18:19:58 +0100 Subject: [PATCH] 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> --- src/plugins/fakevim/fakevimhandler.cpp | 2 ++ 1 file changed, 2 insertions(+) mode change 100755 => 100644 src/plugins/fakevim/fakevimhandler.cpp diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp old mode 100755 new mode 100644 index 9ec88387d39..f4626e0a922 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -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()) { -- GitLab