forked from qt-creator/qt-creator
Editors: Get rid of keeping separate lists of "duplicated" editors.
And use documents for the list of currently open documents, instead of using a set of "original" editors that needed to be separately managed. Change-Id: I3379ca44f03646399d3ecb0e775d7f1fd81a6bcf Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -1999,7 +1999,9 @@ int FakeVimPluginPrivate::currentFile() const
|
||||
{
|
||||
OpenEditorsModel *model = EditorManager::instance()->openedEditorsModel();
|
||||
IEditor *editor = EditorManager::currentEditor();
|
||||
return model->indexOfEditor(editor);
|
||||
if (!editor)
|
||||
return -1;
|
||||
return model->indexOfDocument(editor->document());
|
||||
}
|
||||
|
||||
void FakeVimPluginPrivate::switchToFile(int n)
|
||||
|
||||
Reference in New Issue
Block a user