mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Add additional checks for document length in ConsoleViewImpl, don't run filters if the document is empty. Fixed highlightHyperlinksAndFoldings work for one-liners (RIDER-4390)
This commit is contained in:
@@ -938,7 +938,10 @@ public class ConsoleViewImpl extends JPanel implements ConsoleView, ObservableCo
|
||||
if (!canHighlightHyperlinks && myUpdateFoldingsEnabled) {
|
||||
return;
|
||||
}
|
||||
int endLine = myEditor.getDocument().getLineCount() - 1;
|
||||
DocumentEx document = myEditor.getDocument();
|
||||
if (document.getTextLength() == 0) return;
|
||||
|
||||
int endLine = Math.max(0, document.getLineCount() - 1);
|
||||
|
||||
if (canHighlightHyperlinks) {
|
||||
myHyperlinks.highlightHyperlinks(myFilters, startLine, endLine);
|
||||
|
||||
Reference in New Issue
Block a user