Lubomir Tetak
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
11 additions and
0 deletions
-
src/Avalonia.Controls/Presenters/TextPresenter.cs
|
|
|
@ -461,6 +461,7 @@ namespace Avalonia.Controls.Presenters |
|
|
|
|
|
|
|
public void ShowCaret() |
|
|
|
{ |
|
|
|
EnsureCaretTimer(); |
|
|
|
_caretBlink = true; |
|
|
|
_caretTimer?.Start(); |
|
|
|
InvalidateVisual(); |
|
|
|
@ -484,6 +485,8 @@ namespace Avalonia.Controls.Presenters |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
EnsureCaretTimer(); |
|
|
|
|
|
|
|
if (_caretTimer?.IsEnabled ?? false) |
|
|
|
{ |
|
|
|
_caretBlink = true; |
|
|
|
@ -728,6 +731,14 @@ namespace Avalonia.Controls.Presenters |
|
|
|
|
|
|
|
CaretChanged(); |
|
|
|
} |
|
|
|
|
|
|
|
private void EnsureCaretTimer() |
|
|
|
{ |
|
|
|
if (_caretTimer == null) |
|
|
|
{ |
|
|
|
ResetCaretTimer(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void ResetCaretTimer() |
|
|
|
{ |
|
|
|
|