Skip to content

Commit 1a96846

Browse files
Alexander ShutovReshetnikov_AS
authored andcommitted
Add extension point to change EmptyLineSelectionWidth.
1 parent 614f683 commit 1a96846

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

ICSharpCode.AvalonEdit/Rendering/BackgroundGeometryBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ static IEnumerable<Rect> ProcessTextLines(TextView textView, VisualLine visualLi
244244
continue;
245245
if (segmentStartVCInLine == visualStartCol && i > 0 && segmentStartVC < segmentStartVCInLine && visualLine.TextLines[i - 1].TrailingWhitespaceLength == 0)
246246
continue;
247-
yield return new Rect(pos, y, 1, line.Height);
247+
yield return new Rect(pos, y, textView.EmptyLineSelectionWidth, line.Height);
248248
} else {
249249
Rect lastRect = Rect.Empty;
250250
if (segmentStartVCInLine <= visualEndCol) {

ICSharpCode.AvalonEdit/Rendering/TextView.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2104,5 +2104,13 @@ public int HighlightedLine {
21042104
get { return this.currentLineHighlighRenderer.Line; }
21052105
set { this.currentLineHighlighRenderer.Line = value; }
21062106
}
2107+
2108+
/// <summary>
2109+
/// Empty line selection width.
2110+
/// </summary>
2111+
public virtual double EmptyLineSelectionWidth
2112+
{
2113+
get { return 1; }
2114+
}
21072115
}
21082116
}

0 commit comments

Comments
 (0)