Skip to content

Commit ea59a85

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 f2e7ebd commit ea59a85

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
@@ -534,7 +534,9 @@ func (b *Buffer) Fini() {
534534
if !b.Modified() {
535535
b.Serialize()
536536
}
537-
b.CancelBackup()
537+
if !b.Shared() {
538+
b.CancelBackup()
539+
}
538540

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

0 commit comments

Comments
 (0)