Skip to content

Commit d9798dc

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 ede7af4 commit d9798dc

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)