From 82755a4c33a6aec549b75c7f61777b5f3eaaad0d Mon Sep 17 00:00:00 2001 From: Oscar Lesta Date: Fri, 05 Dec 2025 19:39:47 -0300 Subject: [PATCH] TextView: Move caret position to the end of selection on SelectAll(). This makes it consistent with the behaviour of double/triple click selections. Fixes #4094 / #19842. Change-Id: Ibbbe36c9703207744e79c83447f95815ea5bf8fe Reviewed-on: https://review.haiku-os.org/c/haiku/+/10066 Reviewed-by: John Scipione Tested-by: Commit checker robot --- src/kits/interface/TextView.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/kits/interface/TextView.cpp b/src/kits/interface/TextView.cpp index 73efc39..ba82e74 100644 --- a/src/kits/interface/TextView.cpp +++ b/src/kits/interface/TextView.cpp @@ -1564,7 +1564,9 @@ void BTextView::SelectAll() { - Select(0, fText->Length()); + // Place the cursor at the end of the selection. + fCaretOffset = fText->Length(); + Select(0, fCaretOffset); } -- gitore 0.2.3