mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Invalidate backup timer when removing backup
The backup timer is retaining our document so the document would live for up to two seconds after it was closed, this was mainly a problem for untitled documents, as it meant the next new untitled document created would get a display name of “untitled n”.
This commit is contained in:
@@ -551,6 +551,9 @@ NSString* OakDocumentBookmarkIdentifier = @"bookmark";
|
||||
|
||||
- (void)removeBackup
|
||||
{
|
||||
[_backupTimer invalidate];
|
||||
_backupTimer = nil;
|
||||
|
||||
if(_backupPath)
|
||||
{
|
||||
[[NSFileManager defaultManager] removeItemAtPath:_backupPath error:nullptr];
|
||||
|
||||
Reference in New Issue
Block a user