Skip to content

Commit 358c216

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 f7b2bf5 commit 358c216

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/buffer/buffer.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,9 @@ func (b *Buffer) Fini() {
531531
if !b.Modified() {
532532
b.Serialize()
533533
}
534-
b.CancelBackup()
534+
if !b.Shared() {
535+
b.CancelBackup()
536+
}
535537

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

0 commit comments

Comments
 (0)