Skip to content

Commit 0cef3a6

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 01149b3 commit 0cef3a6

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
@@ -529,7 +529,9 @@ func (b *Buffer) Fini() {
529529
if !b.Modified() {
530530
b.Serialize()
531531
}
532-
b.CancelBackup()
532+
if !b.Shared() {
533+
b.CancelBackup()
534+
}
533535

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

0 commit comments

Comments
 (0)