npp-usermanual
npp-usermanual copied to clipboard
Plugin>Notification: add caveat in the "Notification Key"
need to warn NPPN_* notification users that BufferID might not be the active file, and they need to code accordingly.
For now, it's just in the Notification Key, but before merging the PR, will probably need to propagate that caveat to every notification that uses BufferID, and maybe even add a footnote that gives a good sequence for "get active file + bufferID; if argument bufferID != active.bufferID, save the old_active{bufferID,view,index}, switch to view+index for bufferID, perform actions, and optionally switch back to old_active{bufferID,view,index}" (unfortunately, PythonScript's activateBufferID wraps around multiple calls, so it's more complicated than the pythonscript example)
(per conversation with @alankilborn, after he was dealing with PythonScript SaveAll)