Avoid caching turn past a user action (which causes problems if we suspend/resume across turns)

This commit is contained in:
Tony Garnock-Jones 2021-06-11 09:57:35 +02:00
parent 4970d0fd9e
commit 5e1518c2bb
1 changed files with 7 additions and 6 deletions

View File

@ -484,13 +484,14 @@
(define (stop-if-inert-after action)
(lambda ()
(define turn (current-turn))
(define f (turn-active-facet turn))
(define f (turn-active-facet (current-turn)))
(action)
(turn-enqueue! turn f (lambda ()
(when (or (and (facet-parent f) (not (facet-live? (facet-parent f))))
(facet-inert? f))
(turn-stop! (current-turn)))))))
(turn-enqueue! (current-turn)
f
(lambda ()
(when (or (and (facet-parent f) (not (facet-live? (facet-parent f))))
(facet-inert? f))
(turn-stop! (current-turn)))))))
(define (deliver maybe-proc . args)
(when maybe-proc