supermemo / SuperMemoAssistant.Plugins.EditorPlusPlus

https://www.supermemo.wiki/sma/
MIT License
0 stars 0 forks source link

Feature request: fix SuperMemo's broken double-click word selection #11

Open jordancurve opened 4 years ago

jordancurve commented 4 years ago

When you double-click on a word that is followed by a space, SuperMemo selects both the word and the following space. This makes clozes look weird. Two other people on the SuperMemo Discord also reported having this problem.

It would be nice if SMA could fix this problem so that double-clicking a word selects only the word.

alexis- commented 4 years ago

Challenging. But it's a good FR, thank you.

jordancurve commented 4 years ago

This is actually a problem with Windows in general, not with SuperMemo in particular. There's a good discussion of the issue at superuser.com. A work-around suggested there is to hold the second click (of the double-click) and drag slightly left to remove the selection from the trailing space before releasing the mouse button.

I think this FR can be closed.

alexis- commented 4 years ago

That doesn't sound very satisfactory. I, for one, would like to see this fixed. I will reopen for now.

bjsi commented 4 years ago

I started a solution to this here. Not tested yet.

Idea is to subscribe to ondblclick event. On event check the selection of the focused HtmlControl. If the last character in the text of the selection is a space, move the selection back by one character.

bjsi commented 4 years ago

Can confirm that this solution works. It isn't quite instant though, you can see the selection change from including the space, to not including it.

bjsi commented 4 years ago

Just realised this breaks triple click behaviour