|
|
|
@ -235,10 +235,27 @@ namespace ICSharpCode.TextEditor
@@ -235,10 +235,27 @@ namespace ICSharpCode.TextEditor
|
|
|
|
|
UpdateCaretPosition(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void PaintCaretLine(Graphics g) |
|
|
|
|
{ |
|
|
|
|
if (!textArea.Document.TextEditorProperties.CaretLine) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
HighlightColor caretLineColor = textArea.Document.HighlightingStrategy.GetColorFor("CaretLine"); |
|
|
|
|
|
|
|
|
|
g.DrawLine(BrushRegistry.GetDotPen(caretLineColor.Color, caretLineColor.BackgroundColor), |
|
|
|
|
currentPos.X, |
|
|
|
|
0, |
|
|
|
|
currentPos.X, |
|
|
|
|
textArea.DisplayRectangle.Height); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void UpdateCaretPosition() |
|
|
|
|
{ |
|
|
|
|
Log("UpdateCaretPosition"); |
|
|
|
|
|
|
|
|
|
if (textArea.TextEditorProperties.CaretLine) { |
|
|
|
|
textArea.Invalidate(); |
|
|
|
|
} else { |
|
|
|
|
if (caretImplementation.RequireRedrawOnPositionChange) { |
|
|
|
|
textArea.UpdateLine(oldLine); |
|
|
|
|
if (line != oldLine) |
|
|
|
@ -249,6 +266,7 @@ namespace ICSharpCode.TextEditor
@@ -249,6 +266,7 @@ namespace ICSharpCode.TextEditor
|
|
|
|
|
textArea.UpdateLine(line); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
oldLine = line; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -297,6 +315,7 @@ namespace ICSharpCode.TextEditor
@@ -297,6 +315,7 @@ namespace ICSharpCode.TextEditor
|
|
|
|
|
internal void PaintCaret(Graphics g) |
|
|
|
|
{ |
|
|
|
|
caretImplementation.PaintCaret(g); |
|
|
|
|
PaintCaretLine(g); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
abstract class CaretImplementation : IDisposable |
|
|
|
|