<p></p>
<p>I'm not sure <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="133582868" data-permission-text="Title is private" data-url="https://github.com/geany/geany/issues/905" data-hovercard-type="issue" data-hovercard-url="/geany/geany/issues/905/hovercard" href="https://github.com/geany/geany/issues/905">#905</a> is the same thing, its more about preserving state of files and sessions in an unexpected occurrence and <em>not</em> being annoyed by checks to not save untitled scratch files (its got lots of stuff mixed in together).</p>
<p>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 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="133582868" data-permission-text="Title is private" data-url="https://github.com/geany/geany/issues/905" data-hovercard-type="issue" data-hovercard-url="/geany/geany/issues/905/hovercard" href="https://github.com/geany/geany/issues/905">#905</a> so lets not mix more into the mess thats <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="133582868" data-permission-text="Title is private" data-url="https://github.com/geany/geany/issues/905" data-hovercard-type="issue" data-hovercard-url="/geany/geany/issues/905/hovercard" href="https://github.com/geany/geany/issues/905">#905</a>.</p>
<p><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/etkaar/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/etkaar">@etkaar</a> 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.</p>
<p>Since you want the contents of <code>untitled</code> 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.</p>
<p>Even if its not exactly identical to notebook++ functionality it satisfys the same use-case.</p>
<p>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.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/2717#issuecomment-753895638">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJZXB5QTJM4WBOPQXBTSYGKN7ANCNFSM4VR4RU2Q">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAIOWJ2SCEE62M7KYVS6M7TSYGKN7A5CNFSM4VR4RU22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFTXYRVQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/issues/2717#issuecomment-753895638",
"url": "https://github.com/geany/geany/issues/2717#issuecomment-753895638",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>