On 10/29/15 5:47 PM, Neil Hodgson wrote:
> The reasoning here is that the notification is used to tell the application about events it has no direct control over such as the user pressing the right arrow key. When the application calls SCI_SETSELECTIONN* then it can just call its own update handler.
>
> If someone wants to add SCN_UPDATEUI to selection changing calls then that would be OK.
I think I'd like to see SCN_UPDATEUI sent whenever any selection changes
so I can avoid problems when I add a handler but forget to go back and
change older code. I've attached a diff to add the update messages when
the SETSELECTIONN messages. I understand if you don't want to make this
change and will work around it -- probably by essentially subclassing
the access class.
I noticed in some cases the SC_UPDATE_SELECTION bit is not set
consistently -- it's set on a deletion but not when text is inserted for
example. I suspect most code just processes the UPDATEUI message without
checking the modified bits.
I also noticed that the updateUi signal on qt ScintillaEditBase class
does not pass along the modified field. I've changed this locally and
can send the (small) patch, but I don't know if it's worth changing the
ABI for this.
Thanks,
John