aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/fakevim
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/fakevim')
-rw-r--r--src/plugins/fakevim/fakevimhandler.cpp5
-rw-r--r--src/plugins/fakevim/fakevimhandler.h2
-rw-r--r--src/plugins/fakevim/fakevimplugin.cpp2
3 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp
index f41c8cc63a6..2eb052432cf 100644
--- a/src/plugins/fakevim/fakevimhandler.cpp
+++ b/src/plugins/fakevim/fakevimhandler.cpp
@@ -9546,6 +9546,11 @@ bool FakeVimHandler::jumpToLocalMark(QChar mark, bool backTickMode)
return d->jumpToMark(mark, backTickMode);
}
+bool FakeVimHandler::inFakeVimMode()
+{
+ return d->m_inFakeVim;
+}
+
} // namespace Internal
} // namespace FakeVim
diff --git a/src/plugins/fakevim/fakevimhandler.h b/src/plugins/fakevim/fakevimhandler.h
index 7c0cecaf738..0b615e1657e 100644
--- a/src/plugins/fakevim/fakevimhandler.h
+++ b/src/plugins/fakevim/fakevimhandler.h
@@ -136,6 +136,8 @@ public:
bool jumpToLocalMark(QChar mark, bool backTickMode);
+ bool inFakeVimMode();
+
bool eventFilter(QObject *ob, QEvent *ev) override;
Callback<void(const QString &msg, int cursorPos, int anchorPos, int messageLevel)>
diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp
index 2f86a7d87a7..be06ece7f45 100644
--- a/src/plugins/fakevim/fakevimplugin.cpp
+++ b/src/plugins/fakevim/fakevimplugin.cpp
@@ -1587,6 +1587,8 @@ void FakeVimPluginPrivate::editorOpened(IEditor *editor)
handler->modeChanged.set([tew, this, editor](bool insertMode) {
HandlerAndData &handlerAndData = m_editorToHandler[editor];
+ if (!handlerAndData.handler->inFakeVimMode())
+ return;
// We don't want to show suggestions unless we are in insert mode.
if (insertMode != (handlerAndData.suggestionBlocker == nullptr))