diff --git a/ICSharpCode.AvalonEdit/Rendering/CurrentLineHighlightRenderer.cs b/ICSharpCode.AvalonEdit/Rendering/CurrentLineHighlightRenderer.cs index 91def58..d553341 100644 --- a/ICSharpCode.AvalonEdit/Rendering/CurrentLineHighlightRenderer.cs +++ b/ICSharpCode.AvalonEdit/Rendering/CurrentLineHighlightRenderer.cs @@ -20,8 +20,6 @@ using System; using System.Windows; using System.Windows.Media; -using ICSharpCode.AvalonEdit.Rendering; - namespace ICSharpCode.AvalonEdit.Rendering { sealed class CurrentLineHighlightRenderer : IBackgroundRenderer diff --git a/ICSharpCode.AvalonEdit/Rendering/TextView.cs b/ICSharpCode.AvalonEdit/Rendering/TextView.cs index 8c08cbd..0423b16 100644 --- a/ICSharpCode.AvalonEdit/Rendering/TextView.cs +++ b/ICSharpCode.AvalonEdit/Rendering/TextView.cs @@ -1234,7 +1234,13 @@ namespace ICSharpCode.AvalonEdit.Rendering DisconnectFromTextView(renderer); InvalidateLayer(renderer.Layer); } - + + protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo) + { + base.OnRenderSizeChanged(sizeInfo); + InvalidateLayer(KnownLayer.Selection); + } + /// protected override void OnRender(DrawingContext drawingContext) {