Skip to content

Commit ef57bdc

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 d976b3f commit ef57bdc

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
@@ -527,7 +527,9 @@ func (b *Buffer) Fini() {
527527
if !b.Modified() {
528528
b.Serialize()
529529
}
530-
b.CancelBackup()
530+
if !b.Shared() {
531+
b.CancelBackup()
532+
}
531533

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

0 commit comments

Comments
 (0)