|
|
|
@ -2005,7 +2005,7 @@ namespace Avalonia.Controls |
|
|
|
// The TextBox.TextChanged event was not firing immediately and
|
|
|
|
// was causing an immediate update, even with wrapping. If there is
|
|
|
|
// a selection currently, no update should happen.
|
|
|
|
if (IsTextCompletionEnabled && TextBox != null && TextBoxSelectionLength > 0 && TextBoxSelectionStart != TextBox.Text.Length) |
|
|
|
if (IsTextCompletionEnabled && TextBox != null && TextBoxSelectionLength > 0 && TextBoxSelectionStart != (TextBox.Text?.Length ?? 0)) |
|
|
|
{ |
|
|
|
return; |
|
|
|
} |
|
|
|
@ -2303,7 +2303,7 @@ namespace Avalonia.Controls |
|
|
|
{ |
|
|
|
if (IsTextCompletionEnabled && TextBox != null && userInitiated) |
|
|
|
{ |
|
|
|
int currentLength = TextBox.Text.Length; |
|
|
|
int currentLength = TextBox.Text?.Length ?? 0; |
|
|
|
int selectionStart = TextBoxSelectionStart; |
|
|
|
if (selectionStart == text.Length && selectionStart > _textSelectionStart) |
|
|
|
{ |
|
|
|
|