From 04b878bc2d1dae0c64cb62871f2a40df0565f2e9 Mon Sep 17 00:00:00 2001 From: Dmytro Maluka Date: Sat, 2 Aug 2025 23:09:16 +0200 Subject: [PATCH] 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). --- internal/buffer/backup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/buffer/backup.go b/internal/buffer/backup.go index 8b728ec6..9470c663 100644 --- a/internal/buffer/backup.go +++ b/internal/buffer/backup.go @@ -126,7 +126,7 @@ func (b *SharedBuffer) Backup() error { // RemoveBackup removes any backup file associated with this buffer func (b *SharedBuffer) RemoveBackup() { - if !b.Settings["backup"].(bool) || b.keepBackup() || b.Path == "" || b.Type != BTDefault { + if b.keepBackup() || b.Path == "" || b.Type != BTDefault { return } f := util.DetermineEscapePath(b.backupDir(), b.AbsPath)