forked from qt-creator/qt-creator
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:
@@ -1550,6 +1550,14 @@ void FakeVimPluginPrivate::editorOpened(IEditor *editor)
|
|||||||
if (!editor)
|
if (!editor)
|
||||||
return;
|
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();
|
QWidget *widget = editor->widget();
|
||||||
if (!widget)
|
if (!widget)
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user