diff --git a/Source/Engine/UI/GUI/Common/TextBoxBase.cs b/Source/Engine/UI/GUI/Common/TextBoxBase.cs index 05183d57a..c08b59f48 100644 --- a/Source/Engine/UI/GUI/Common/TextBoxBase.cs +++ b/Source/Engine/UI/GUI/Common/TextBoxBase.cs @@ -769,13 +769,13 @@ namespace FlaxEngine.GUI { SetSelection(SelectionLeft); } - else if (SelectionLeft > 0) + else if (SelectionLeft >= 0) { int position; if (ctrl) position = FindPrevWordBegin(); else - position = _selectionEnd - 1; + position = Mathf.Max(_selectionEnd - 1, 0); if (shift) {