It seems that selectionRange is trying to be two things : either working in "cursor mode" including auto breaking chars (split text) or in "real mode" using the actual real text. This shows when doing select all for instance where we would want to select all the text before rendering was done (at creation time) and depending on the display this will change.
I think it should always be in real mode, with eventually a cursor mode cache calculated during draw() but this requires a complete review.
It seems that selectionRange is trying to be two things : either working in "cursor mode" including auto breaking chars (split text) or in "real mode" using the actual real text. This shows when doing select all for instance where we would want to select all the text before rendering was done (at creation time) and depending on the display this will change.
I think it should always be in real mode, with eventually a cursor mode cache calculated during draw() but this requires a complete review.