I'm not sure #905 is the same thing, its more about preserving state of files 
and sessions in an unexpected occurrence and _not_ being annoyed by checks to 
not save untitled scratch files (its got lots of stuff mixed in together).

But this is about preserving unnamed editing tab contents in normal 
circumstances, which is something else again.  This isn't (IIUC) targeted at 
the same thing as #905 so lets not mix more into the mess thats #905.

@etkaar a plugin saving files to disk is what autosave does, so thats why we 
suggest this has some affinity with the existing functionality of that plugin, 
and you may be able to reuse some of its code.  

Since you want the contents of `untitled` tabs preserved, they need to be saved 
somewhere by the plugin and reloaded on start up.  Since the editing tabs are 
designed to load and save files, that seems the simplest solution for your 
plugin, save them in files with names it makes up, in a hidden location 
somewhere.

Even if its not exactly identical to notebook++ functionality it satisfys the 
same use-case.

As for keeping status colour, you may have difficulty controlling it because 
thats checked against the file date/time and updated regularly, but if the tabs 
contents are saved/not yet saved its probably good to know that.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2717#issuecomment-753895638

Reply via email to