[QScintilla] Main selection color is not changed properly in some cases

Scener Spanish spscener84 at gmail.com
Tue May 14 13:01:06 BST 2019


> The colour being used is a hardcoded value that cannot be changed. This
> colour is used when the caret is not in the selection and the selection
> is not the primary selection. As far as I can see, this reflects what is
> happening. I don't know what the purpose of this colour is.
>

Me neither, although if we stick to the docs we can see there are 2 colors
when it comes to selections, the main
selection and additional ones... maybe that hardcoded value is the default
value of additional selections
changed somewhere else? (Dunno, just speculating)


> It seems to me that the behaviour you are expecting is that the CTRL
> modifier should be ignored when making the first selection. Changing
> line 4627 of Editor.cpp from...
>
>      if (ctrl && multipleSelection) {
>
> ...to...
>
>      if (ctrl && multipleSelection && !SelectionEmpty()) {
>

Awesome, nice you've already found a possible workaround/hack for the first
test but I wonder, why is it necessary to have
these workaround at all? Shouldn't QScintilla be a simple layer/bypass of
Scintilla? I mean... when you use Scintilla/Scite the
issue of the first test won't appear


> ...achieves this. However this changes doesn't affect the second test.
>

:( , fixing the 2nd test would be awesome as one of the more common tasks
when using multiselection is what in SublimeText is known
as "Quick Find All" which is a great tool when it comes to refactor code.

Anyway, thanks for looking into this!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/qscintilla/attachments/20190514/777b8a1d/attachment.html>


More information about the QScintilla mailing list