Currently unicode-segmentation is used to implement word-mode selection (double-click + drag).
Issue: this does not always consider a full stop as a separator; e.g. text.len is considered one word. (This follows UAX #29, but is undesirable for text editing, at least for code.)
Addressing this in unicode-segmentation has been rejected: unicode-rs/unicode-segmentation#171 with the suggestion to switch to ICU4X.
Blocker: we currently use bi-directional iteration which is not yet supported (unicode-org/icu4x#6996). (We could avoid this if we always iterate from the start.)
Blocker: icu_segmenter doesn't support "words" like unicode-segmentation::UnicodeWords. We can likely get around this by testing properties of the contained chars (e.g. Alnum), though this feels like it should be integrated with the segmentation itself.
It also doesn't look like ICU4X currently supports other types of word segmentation anyway.
Currently unicode-segmentation is used to implement word-mode selection (double-click + drag).
Issue: this does not always consider a full stop as a separator; e.g.
text.lenis considered one word. (This follows UAX #29, but is undesirable for text editing, at least for code.)Addressing this in unicode-segmentation has been rejected: unicode-rs/unicode-segmentation#171 with the suggestion to switch to ICU4X.
Blocker: we currently use bi-directional iteration which is not yet supported (unicode-org/icu4x#6996). (We could avoid this if we always iterate from the start.)
Blocker:
icu_segmenterdoesn't support "words" likeunicode-segmentation::UnicodeWords. We can likely get around this by testing properties of the contained chars (e.g.Alnum), though this feels like it should be integrated with the segmentation itself.It also doesn't look like ICU4X currently supports other types of word segmentation anyway.