code
code copied to clipboard
Do not highlight neighbouring words of selected space
Fixes #1299
The selection extension algorithm is reworked so that leading and trailing space is ignored and the search context is not extended to neighbouring words
I think I can confirm the original issue was fixed, but there's a couple new issues here that aren't in master:
Now selecting whitespace highlights all instances of whitespace. It seems like we should never highlight white space right?
If you highlight some whitespace, whatever comes after that whitespace will count as a selection:

@danirabbit Hopefully the algorithm now works as expected. It is not entirely clear how a partial selection should be auto-extended by this plugin. Perhaps it should be documented in the code if it can be decided. This PR now autoextends the selection to word boundaries as determined by a couple of UnicodeBreakTypes but will not extend to include e.g. enclosing brackets.
Nothing happens now if you just select space.
Leading and trailing space is ignored even if manually selected (is this correct?)
It is difficult to test this with all possible characters though.