mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-200666 don't show empty editors
This commit is contained in:
@@ -372,6 +372,10 @@ public class RecentLocationsAction extends AnAction {
|
||||
Document fileDocument = positionOffset.getDocument();
|
||||
int lineNumber = fileDocument.getLineNumber(positionOffset.getStartOffset());
|
||||
TextRange actualTextRange = getTrimmedRange(fileDocument, lineNumber);
|
||||
if (actualTextRange.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
EditorFactory editorFactory = EditorFactory.getInstance();
|
||||
Document editorDocument = editorFactory.createDocument(fileDocument.getText(actualTextRange));
|
||||
EditorEx editor = (EditorEx)editorFactory.createEditor(editorDocument, project);
|
||||
|
||||
Reference in New Issue
Block a user