sieukrem / jn-npp-plugin

Plugin for Notepad++ allowing you to automate some tasks using JavaScript
https://github.com/sieukrem/jn-npp-plugin/wiki
110 stars 24 forks source link

SC_UPDATE_SELECTION #36

Closed lollita closed 5 years ago

lollita commented 8 years ago

i would to autocopy selection in clipboard. i tryed:

UPDATEUI:function(v, pos, x){ if(SC_UPDATE_SELECTION){ if(currentView.selection!==""){ System.clipBoard = currentView.selection; } } }

but how check SC_UPDATE_SELECTION?

p.s. x64 proceeds? it would be the first x64 third party plugins.

sieukrem commented 8 years ago

you are right there is no way to check what was the cause of UPDATEUI. As workaround you can check the bytePos and byteAnchor to detect any selection change between two UPDATEUI calls.