aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/string.tes
diff options
context:
space:
mode:
authorRobin Haberkorn <rhaberkorn@fmsbw.de>2025-12-28 21:22:46 +0100
committerRobin Haberkorn <rhaberkorn@fmsbw.de>2025-12-28 21:22:46 +0100
commit0b593eb7d0e6907b19cdbb605caf1becae351004 (patch)
treeadb88b74827b597880b5655444d041bae917ea85 /lib/string.tes
parentea0a23645f03a42252ab1ce8df45ae4076ebae75 (diff)
fixed left-over recovery files
* It was possible to provoke left-over recovery files even if the editor does *not* crash: 1. If you dirtified the buffer (state = TECO_BUFFER_DIRTY), it would be dumped to a recovery file (TECO_BUFFER_DIRTY_DUMPED). 2. If you dirtify the buffer again, the state will become TECO_BUFFER_DIRTY again, so it's up for dumping in the next cycle. 3. If you now save and exit (e.g. `:EX`) the recovery file is not deleted since the state is not TECO_BUFFER_DIRTY_DUMPED. * A buffer can have a recovery file both for TECO_BUFFER_DIRTY and TECO_BUFFER_DIRTY_DUMPED, so we must clean up afterwards in both states. * Of course, it may __not__ yet have a recovery file in the TECO_BUFFER_DIRTY state. The g_unlink() might therefore be superfluous on those files. Moreover, if you disable recovery files, SciTECO will now still try to unlink the recovery file. These operations could only be avoided by adding yet another state, e.g. TECO_BUFFER_DIRTY_OUTDATED_DUMP, so that after the first dump you will never switch back into TECO_BUFFER_DIRTY.
Diffstat (limited to 'lib/string.tes')
0 files changed, 0 insertions, 0 deletions