FakeVim: Don't create two handlers for one editor

Amends 206e9f95fb.

Fixes: QTCREATORBUG-25770
Change-Id: I4028a7c8257ee3985fd2198e789d98b25901d92d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2021-06-10 14:40:29 +02:00
parent 1f2add35ba
commit d0c32df3fe

View File

@@ -1550,6 +1550,14 @@ void FakeVimPluginPrivate::editorOpened(IEditor *editor)
if (!editor)
return;
if (m_editorToHandler.contains(editor)) {
// We get here via the call from the duplicated handler in case
// it was triggered by triggerAction(Core::Constants::SPLIT).
// On the other hand, we need the path from there to support the
// case of manual calls to IEditor::duplicate().
return;
}
QWidget *widget = editor->widget();
if (!widget)
return;