Skip to content

Commit 5d685bc

Browse files
committed
Merge pull request #65 from hemnstill/dev2master
Added extension point and make some methods are virtual
2 parents 614f683 + eb96892 commit 5d685bc

3 files changed

Lines changed: 11 additions & 3 deletions

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: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1619,7 +1619,7 @@ Rect IScrollInfo.MakeVisible(Visual visual, Rect rectangle)
16191619
/// <summary>
16201620
/// Scrolls the text view so that the specified rectangle gets visible.
16211621
/// </summary>
1622-
public void MakeVisible(Rect rectangle)
1622+
public virtual void MakeVisible(Rect rectangle)
16231623
{
16241624
Rect visibleRectangle = new Rect(scrollOffset.X, scrollOffset.Y,
16251625
scrollViewport.Width, scrollViewport.Height);
@@ -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
}

ICSharpCode.AvalonEdit/Rendering/VisualLineLinkText.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public override TextRun CreateTextRun(int startVisualColumn, ITextRunConstructio
7474
/// </summary>
7575
/// <remarks>Returns true when control is pressed; or when
7676
/// <see cref="RequireControlModifierForClick"/> is disabled.</remarks>
77-
protected bool LinkIsClickable()
77+
protected virtual bool LinkIsClickable()
7878
{
7979
if (NavigateUri == null)
8080
return false;

0 commit comments

Comments
 (0)