Makes sense, but I guess this could be better documented. It should
mention that complex
apps using rect/thin selections are better of using
SCI_GETSELECTIONMODE. And they
should check for both modes (rect and thin).
Also it is not very clear what different selection modes do. What is the
difference between
them and when to use them and so on.
Another strangeness in the api is the behaviour of SCI_SETSELECTIONMODE.
It is
clearly documented that when switching modes it will enter a move-extend
mode, but
reading the docs for the first time I thought this doesn't relate to me.
Because I didn't
understand what extend means. Then after I spent some time (30-60
minutes) debugging
why the code which drops from rect to stream selection is causing cursor
movements to
change the selection I understood its meaning. The ugly part is that to
do what I want I
have to send the command twice.
I'm not sure why the api is designed this way, but I guess it is very
surprising the first time
one uses it. It would have been better if this mode is enabled by
passing some kind of a
flag parameter.
Just sharing my experience, if it matters.
/Teodor