There’s also a problem here, with the “unsaved” files after closing Npp. Npp knows that some files were unsaved because it saves copies of them. However SCI_GETMODIFY reports that no changes have been made to the files once you reopen them. It would have been really helpful, if this was consistent with the small “save” icon on top of the tab.
It would even be more helpful, so simply be able to ask NPP “isFileDirty” i.e. get the status of the “save” button somehow.
Right now, I have to duplicate all the work the NPP does, i.e. chekc if there’s a copy of the file saved upon opening etc.