Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e264ac39 authored by Mady Mellor's avatar Mady Mellor
Browse files

Text selection: Fix word boundaries for languages without spaces

WordIterator's getEnd/getBeginning methods does not support the needs
for word boundary detection in text selection. Consider the words
AABB (where AA and BB are each words). If getEnd is given the offset
on the boundary between AA and BB, it would return that offset since
it is the end of AA. For text selection we always want the "next end"
if available.

This CL adds two methods to word iterator that return the next end
and previous beginning.

This CL also alters the code in Start/EndHandle to use the x value
and current / prev line positions to determine if the user is
expanding or contracting the selection.

Bug: 21305292
Change-Id: I6e7a83e53e245d71e43d78f1957f844f2ed1cdfb
parent c54bcade
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment