mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't access user data for frozen documents: it'll throw and they have no vFile anyway
This commit is contained in:
+2
@@ -19,6 +19,7 @@ import com.intellij.openapi.editor.ex.DocumentEx;
|
||||
import com.intellij.openapi.editor.ex.PrioritizedDocumentListener;
|
||||
import com.intellij.openapi.editor.impl.DocumentImpl;
|
||||
import com.intellij.openapi.editor.impl.EditorFactoryImpl;
|
||||
import com.intellij.openapi.editor.impl.FrozenDocument;
|
||||
import com.intellij.openapi.editor.impl.TrailingSpacesStripper;
|
||||
import com.intellij.openapi.fileEditor.*;
|
||||
import com.intellij.openapi.fileEditor.impl.text.TextEditorImpl;
|
||||
@@ -242,6 +243,7 @@ public class FileDocumentManagerImpl extends FileDocumentManager implements Virt
|
||||
@Override
|
||||
@Nullable
|
||||
public VirtualFile getFile(@NotNull Document document) {
|
||||
if (document instanceof FrozenDocument) return null;
|
||||
return document.getUserData(FILE_KEY);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user