Skip to content

Commit 04b878b

Browse files
committed
Ignore the backup option when removing backup
When we need to remove existing backup for whatever reason (e.g. because we've just successfully saved the file), we should do that regardless of whether backups are enabled or not, since a backup may exist regardless (it could have been created before the `backup` option got disabled).
1 parent e127f08 commit 04b878b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/buffer/backup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func (b *SharedBuffer) Backup() error {
126126

127127
// RemoveBackup removes any backup file associated with this buffer
128128
func (b *SharedBuffer) RemoveBackup() {
129-
if !b.Settings["backup"].(bool) || b.keepBackup() || b.Path == "" || b.Type != BTDefault {
129+
if b.keepBackup() || b.Path == "" || b.Type != BTDefault {
130130
return
131131
}
132132
f := util.DetermineEscapePath(b.backupDir(), b.AbsPath)

0 commit comments

Comments
 (0)