diff --git a/src/AvaloniaEdit/Rendering/CurrentLineHighlightRenderer.cs b/src/AvaloniaEdit/Rendering/CurrentLineHighlightRenderer.cs
index 243ba8f3..1d193be9 100644
--- a/src/AvaloniaEdit/Rendering/CurrentLineHighlightRenderer.cs
+++ b/src/AvaloniaEdit/Rendering/CurrentLineHighlightRenderer.cs
@@ -47,7 +47,7 @@ public int Line {
}
}
- public KnownLayer Layer => KnownLayer.Selection;
+ public KnownLayer Layer => KnownLayer.Background;
public IBrush BackgroundBrush {
get; set;
diff --git a/src/AvaloniaEdit/Rendering/TextView.cs b/src/AvaloniaEdit/Rendering/TextView.cs
index 5e91d4c7..83a430c9 100644
--- a/src/AvaloniaEdit/Rendering/TextView.cs
+++ b/src/AvaloniaEdit/Rendering/TextView.cs
@@ -66,7 +66,7 @@ static TextView()
}
private readonly ColumnRulerRenderer _columnRulerRenderer;
- private readonly CurrentLineHighlightRenderer _currentLineHighlighRenderer;
+ private readonly CurrentLineHighlightRenderer _currentLineHighlightRenderer;
///
/// Creates a new TextView instance.
@@ -79,8 +79,8 @@ public TextView()
_elementGenerators = new ObserveAddRemoveCollection(ElementGenerator_Added, ElementGenerator_Removed);
_lineTransformers = new ObserveAddRemoveCollection(LineTransformer_Added, LineTransformer_Removed);
_backgroundRenderers = new ObserveAddRemoveCollection(BackgroundRenderer_Added, BackgroundRenderer_Removed);
+ _currentLineHighlightRenderer = new CurrentLineHighlightRenderer(this);
_columnRulerRenderer = new ColumnRulerRenderer(this);
- _currentLineHighlighRenderer = new CurrentLineHighlightRenderer(this);
Options = new TextEditorOptions();
Debug.Assert(_singleCharacterElementGenerator != null); // assert that the option change created the builtin element generators
@@ -1929,11 +1929,11 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang
}
if (change.Property == CurrentLineBorderProperty)
{
- _currentLineHighlighRenderer.BorderPen = CurrentLineBorder;
+ _currentLineHighlightRenderer.BorderPen = CurrentLineBorder;
}
if (change.Property == CurrentLineBackgroundProperty)
{
- _currentLineHighlighRenderer.BackgroundBrush = CurrentLineBackground;
+ _currentLineHighlightRenderer.BackgroundBrush = CurrentLineBackground;
}
}
@@ -2028,8 +2028,8 @@ public IPen CurrentLineBorder
///
public int HighlightedLine
{
- get => _currentLineHighlighRenderer.Line;
- set => _currentLineHighlighRenderer.Line = value;
+ get => _currentLineHighlightRenderer.Line;
+ set => _currentLineHighlightRenderer.Line = value;
}
///