Pluto.jl icon indicating copy to clipboard operation
Pluto.jl copied to clipboard

Double click with cool characters does not select the whole token

Open fonsp opened this issue 4 years ago • 1 comments

https://user-images.githubusercontent.com/6933510/154072320-596d5ae8-2c22-440d-a771-35cbfa8cf929.mov

fonsp avatar Feb 15 '22 13:02 fonsp

Note to self/future implementer:

This is possible, using EditorState.charCategorizer, but configuring it is only possible by providing a string with possible word characters... Well, that won't fit all the unicode we need.

We can add ! and @ though, to make it at least a little bit nicer.

BUT

We can also override EditorState.charCategorizer like this:

EditorState.prototype.charCategorizer = (pos) => (char) => 0

This will make it so everything is selected on doubleclick! We can make it check for unicode ranges or regex here, so that is nice.

BUT

We could even override the whole mouse selection stuff... but that would be a lot more work I think.

dralletje avatar Feb 23 '23 22:02 dralletje