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:
Eike Ziller
2013-07-05 16:00:19 +02:00
parent b89afac9d4
commit b99de1de58
8 changed files with 214 additions and 301 deletions

View File

@@ -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)