mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
revert fix for IDEA-105408
caret row becomes almost invisible in some languages (PHP, Velocity, etc)
This commit is contained in:
@@ -16,8 +16,8 @@
|
||||
package com.intellij.openapi.editor.markup;
|
||||
|
||||
public interface HighlighterLayer {
|
||||
int CARET_ROW = 1000;
|
||||
int SYNTAX = 2000;
|
||||
int SYNTAX = 1000;
|
||||
int CARET_ROW = 2000;
|
||||
int ADDITIONAL_SYNTAX = 3000;
|
||||
int GUARDED_BLOCKS = 3500;
|
||||
int WARNING = 4000;
|
||||
|
||||
@@ -462,16 +462,16 @@ public final class IterationState {
|
||||
guard = null;
|
||||
}
|
||||
|
||||
if (syntax != null && highlighter.getLayer() < HighlighterLayer.SYNTAX) {
|
||||
cachedAttributes.add(syntax);
|
||||
syntax = null;
|
||||
}
|
||||
|
||||
if (caret != null && highlighter.getLayer() < HighlighterLayer.CARET_ROW) {
|
||||
cachedAttributes.add(caret);
|
||||
caret = null;
|
||||
}
|
||||
|
||||
if (syntax != null && highlighter.getLayer() < HighlighterLayer.SYNTAX) {
|
||||
cachedAttributes.add(syntax);
|
||||
syntax = null;
|
||||
}
|
||||
|
||||
TextAttributes textAttributes = highlighter.getTextAttributes();
|
||||
if (textAttributes != null && textAttributes != TextAttributes.ERASE_MARKER) {
|
||||
cachedAttributes.add(textAttributes);
|
||||
@@ -484,8 +484,8 @@ public final class IterationState {
|
||||
if (selection != null) cachedAttributes.add(selection);
|
||||
if (fold != null) cachedAttributes.add(fold);
|
||||
if (guard != null) cachedAttributes.add(guard);
|
||||
if (syntax != null) cachedAttributes.add(syntax);
|
||||
if (caret != null) cachedAttributes.add(caret);
|
||||
if (syntax != null) cachedAttributes.add(syntax);
|
||||
|
||||
Color fore = null;
|
||||
Color back = isInGuardedBlock ? myReadOnlyColor : null;
|
||||
|
||||
+6
-6
@@ -516,16 +516,16 @@ public class IterationState {
|
||||
guard = null;
|
||||
}
|
||||
|
||||
if (syntax != null && highlighter.getLayer() < HighlighterLayer.SYNTAX) {
|
||||
cachedAttributes.add(syntax);
|
||||
syntax = null;
|
||||
}
|
||||
|
||||
if (caret != null && highlighter.getLayer() < HighlighterLayer.CARET_ROW) {
|
||||
cachedAttributes.add(caret);
|
||||
caret = null;
|
||||
}
|
||||
|
||||
if (syntax != null && highlighter.getLayer() < HighlighterLayer.SYNTAX) {
|
||||
cachedAttributes.add(syntax);
|
||||
syntax = null;
|
||||
}
|
||||
|
||||
TextAttributes textAttributes = highlighter.getTextAttributes();
|
||||
if (textAttributes != null && textAttributes != TextAttributes.ERASE_MARKER) {
|
||||
cachedAttributes.add(textAttributes);
|
||||
@@ -535,8 +535,8 @@ public class IterationState {
|
||||
if (selection != null) cachedAttributes.add(selection);
|
||||
if (fold != null) cachedAttributes.add(fold);
|
||||
if (guard != null) cachedAttributes.add(guard);
|
||||
if (syntax != null) cachedAttributes.add(syntax);
|
||||
if (caret != null) cachedAttributes.add(caret);
|
||||
if (syntax != null) cachedAttributes.add(syntax);
|
||||
|
||||
Color fore = null;
|
||||
Color back = isInGuardedBlock ? myReadOnlyColor : null;
|
||||
|
||||
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 132 B |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 130 B |
@@ -69,9 +69,10 @@ public class EditorPaintingTest extends AbstractEditorTest {
|
||||
checkResult();
|
||||
}
|
||||
|
||||
public void testCaretRowHasLowerPriorityThanSyntax() throws Exception {
|
||||
public void testCaretRowWinsOverSyntaxEvenInPresenceOfHighlighter() throws Exception {
|
||||
initText("foo");
|
||||
setUniformEditorHighlighter(new TextAttributes(null, Color.red, null, null, Font.PLAIN));
|
||||
addRangeHighlighter(0, 3, 0, null, Color.blue);
|
||||
checkResult();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user