Commit a12a9f49 authored by hluk's avatar hluk Committed by hjk

FakeVim: Ensure that enterFakeVim() is not called recursively

Task-number: QTCREATORBUG-10226
Change-Id: Ib58d43dc11071a5dc28bad53e13213a4413fca71
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent ac363113
...@@ -2030,7 +2030,7 @@ void FakeVimHandler::Private::focus() ...@@ -2030,7 +2030,7 @@ void FakeVimHandler::Private::focus()
void FakeVimHandler::Private::enterFakeVim() void FakeVimHandler::Private::enterFakeVim()
{ {
QTC_ASSERT(!m_inFakeVim, qDebug() << "enterFakeVim() shouldn't be called recursively!"); QTC_ASSERT(!m_inFakeVim, qDebug() << "enterFakeVim() shouldn't be called recursively!"; return);
m_cursor = EDITOR(textCursor()); m_cursor = EDITOR(textCursor());
m_inFakeVim = true; m_inFakeVim = true;
...@@ -2054,7 +2054,7 @@ void FakeVimHandler::Private::enterFakeVim() ...@@ -2054,7 +2054,7 @@ void FakeVimHandler::Private::enterFakeVim()
void FakeVimHandler::Private::leaveFakeVim(bool needUpdate) void FakeVimHandler::Private::leaveFakeVim(bool needUpdate)
{ {
QTC_ASSERT(m_inFakeVim, qDebug() << "enterFakeVim() not called before leaveFakeVim()!"); QTC_ASSERT(m_inFakeVim, qDebug() << "enterFakeVim() not called before leaveFakeVim()!"; return);
// The command might have destroyed the editor. // The command might have destroyed the editor.
if (m_textedit || m_plaintextedit) { if (m_textedit || m_plaintextedit) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment