Differentiate user pressing Backspace vs Find and Replace action
-
Hey, as in topic, is it possible? I currently detect backspace presses (deleting text) with SCN_MODIFIED and checking for flags SC_PERFORMED_USER & SC_MOD_DELETETEXT, but it appears the exact same notifications with exact same flags is dispatched when using Find and Replace function, which slows the replacement action down.
My plugin is Code::Stats, it should add 1 XP on each character typed or deleted. Pasting or deleting multiple characters at once should also add just 1 XP, not the amount of characters changed. For adding characters, SCN_CHARADDED notification is the perfect solution. For removing I was using mentioned SCN_MODIFIED checking flags, is there a better solution? -
maybe hooking npp and both scintilla message queues and see
if you can find a pattern which could explain that this is/was a find/replace action?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login