#4094: FilePanel: File Name is Selected Back to Front
------------------------------------+---------------------------
Reporter: bonefish | Owner: axeld
Type: bug | Status: new
Priority: normal | Milestone: R1
Component: Applications/Tracker | Version: R1/pre-alpha1
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
------------------------------------+---------------------------
Comment (by pulkomandy):
That would work, if done before the SelectAll() call.
Things behave the same in other apps as far as I can tell: SelectAll never
moves the cursor. So if the cursor position is not set to anything
special, it will be at position 0. The same happens for example in Web+
address bar.
However, if the text is added with InsertText, rather than SetText, the
caret is moved to the end of the inserted text, and in that case, the
selection shortcut will work from the end.
It's also possible to select all while the caret is in the middle of the
text, for yet different results (then the shift+arrow deselects all char
until the closest edge of the selection).
So, it seems to be nothing special to Tracker, just that the text is set
with SetText then immediately selected with SelectAll.
--
Ticket URL: <https://dev.haiku-os.org/ticket/4094#comment:5>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.