Skip to content

Commit f3ea704

Browse files
committed
buffer: Don't cancel the backup in case the buffer is shared
Otherwise it will be removed async, which shouldn't happen in case there is still one buffer open with the same modified file.
1 parent e8fbfb1 commit f3ea704

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

internal/buffer/buffer.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,9 @@ func (b *Buffer) Fini() {
528528
if !b.Modified() {
529529
b.Serialize()
530530
}
531-
b.CancelBackup()
531+
if !b.Shared() {
532+
b.CancelBackup()
533+
}
532534

533535
if b.Type == BTStdout {
534536
fmt.Fprint(util.Stdout, string(b.Bytes()))

0 commit comments

Comments
 (0)