I'm interested in the SC_MOD_INSERTCHECK, SC_MOD_INSERTTEXT and SC_MOD_DELETETEXT notifications types of SCN_MODIFIED.
These notifications may happen when:
I'd like to be able to distinguish these two cases.
For example, in case of SC_MOD_INSERTCHECK or SC_MOD_INSERTTEXT, I want to provide one kind of reaction to a character pressed by user (a "typing flow") and to provide another kind of reaction to text pasted from the clipboard (a "pasting flow"). How can I achieve that?
With typed characters, there is a
SCN_CHARADDEDnotification after theSCN_MODIFIED.It would be reasonable to add another field or re-use
characterSourceto distinguish cases but it would require work at many call sites. There are around 35 direct calls to inserting text and some of these are from multiple causes. An implementation would need to define a reasonable enumeration - which cases are distinct and which are equivalent.