Previously, when navigating in a text editor by words, the cursor would
get 'stuck' after moving a single word. This issue should now be
resolved.
Additionally, the cursor position was not updated properly when
adjusting a selection, and would instead be moved to the end of the
selected range. With this patch applied, the cursor should now be set to
the correct position when modifying selections. When extending a
selection backwards, the cursor will display at the beginning of the
selected range, rather than the end.
Finally, most Android apps announce the 'skipped' characters or words
whenever the cursor is moved, but this feature was broken in JUCE. This
patch enables this feature.
Previously, when navigating in a text editor by words, the cursor would
get 'stuck' after moving a single word. This issue should now be
resolved.
Additionally, the cursor position was not updated properly when
adjusting a selection, and would instead be moved to the end of the
selected range. With this patch applied, the cursor should now be set to
the correct position when modifying selections. When extending a
selection backwards, the cursor will display at the beginning of the
selected range, rather than the end.
Finally, most Android apps announce the 'skipped' characters or words
whenever the cursor is moved, but this feature was broken in JUCE. This
patch enables this feature.
The change introduced in 92f350e617 led to
a regression in the MoveEndpointByUnit function. In this case, a
backward movement by a single character *should* move the endpoint as
long as it remains within the text range.
The issue addressed by the faulty commit is better fixed by
special-casing the 'character' unit case in the ExpandToEnclosingUnit
function.
Narrator on Windows seems to call ExpandToEnclosingUnit to find the
character immediately following the current cursor position. When
expanding a degenerate range with position `input` (used to represent
the cursor position) to a single-character range, the returned range
should start at `input` and end at `input+1`. Previously,
findTextBoundary() would always return the position before
currentPosition when searching backwards by character, so the result of
ExpandToEnclosingUnit would be off-by-one when expanding to the closest
character.