Page MenuHomePhabricator

VisualEditor: Add whitespace skipping to UnicodeJS.wordbreak for word skipping functionality
Closed, ResolvedPublic

Description

Currently we can't use the UnicodeJS.wordbreak library to emulate word skipping (ctrl+arrow / alt+arrow) functionality as wordbreaks appear either side of whitespace and between multiple whitespaces:

OneTwoThree

Moving forwards we expect the cursor to stop in the following positions:
One| Two| Three|

Moving backwards we expect:

OneTwoThree

Version: unspecified
Severity: normal

Details

Reference
bz46794

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:36 AM
bzimport set Reference to bz46794.

Looking at other implementations, sepcifically OpenOffice, they have an "ignore whitespace" mode in their nextWord function:

https://svn.apache.org/repos/asf/incubator/ooo/symphony/trunk/main/i18npool/source/breakiterator/breakiterator_unicode.cxx

which calls an is_whitepsace function, which is defined as:
http://www.icu-project.org/apiref/icu4c/uchar_8h.html#a5cef869b23e8d8e649963457cccca68e

I have added better support for skipping white spaces in 4th patch set: https://gerrit.wikimedia.org/r/#/c/57076/

Actually Ed is still working on it.

Related URL: https://gerrit.wikimedia.org/r/58868 (Gerrit Change I6b2700d65476c4d34ba4a01a88382d7af8e736fb)