IDEA-CR-42837: replace documents committing with assertion

This commit is contained in:
Sergey Malenkov
2019-02-06 16:20:03 +03:00
parent dbe0b45501
commit 7c79420970
@@ -1983,7 +1983,7 @@ public class ProjectViewImpl extends ProjectView implements PersistentStateCompo
if (file != null) {
int offset = editor.getCaretModel().getOffset();
PsiDocumentManager manager = PsiDocumentManager.getInstance(getProject());
if (manager.hasUncommitedDocuments()) manager.commitAllDocuments();
LOG.assertTrue(manager.isCommitted(editor.getDocument()));
PsiElement element = file.findElementAt(offset);
if (element != null) return element;
}