mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-71304 Editor: Correct brace highlighting for the active debugger line
Don't bound line highlighter to the first non-space offset. Bind it to the line start offset instead.
This commit is contained in:
@@ -23,6 +23,7 @@ import com.intellij.openapi.editor.markup.TextAttributes;
|
||||
import com.intellij.util.Consumer;
|
||||
import com.intellij.util.Processor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
@@ -33,6 +34,7 @@ import java.util.Iterator;
|
||||
public interface MarkupModelEx extends MarkupModel {
|
||||
void dispose();
|
||||
|
||||
@Nullable
|
||||
RangeHighlighter addPersistentLineHighlighter(int lineNumber, int layer, TextAttributes textAttributes);
|
||||
boolean containsHighlighter(@NotNull RangeHighlighter highlighter);
|
||||
|
||||
|
||||
@@ -69,7 +69,8 @@ public class MarkupModelImpl extends UserDataHolderBase implements MarkupModelEx
|
||||
throw new IndexOutOfBoundsException("lineNumber:" + lineNumber + ". Must be in [0, " + (getDocument().getLineCount() - 1) + "]");
|
||||
}
|
||||
|
||||
int offset = getFirstNonspaceCharOffset(getDocument(), lineNumber);
|
||||
int offset = getDocument().getLineStartOffset(lineNumber);
|
||||
//int offset = getFirstNonspaceCharOffset(getDocument(), lineNumber);
|
||||
|
||||
return addRangeHighlighter(offset, offset, layer, textAttributes, HighlighterTargetArea.LINES_IN_RANGE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user