installer: Makes sure the installer proceeds after hitting "Edit".

Fixes <https://bugs.gnu.org/39199>.
Reported by Jonathan Brielmaier <jonathan.brielmaier@web.de>.

* gnu/installer/newt/page.scm (run-file-textbox-page): Move 'loop' to
the beginning of the body.  Do not call 'loop' from the 'dynamic-wind'
exit handler as we would not return the value of the second call to
'loop'.
This commit is contained in:
Ludovic Courtès 2020-01-20 14:34:16 +01:00
parent 25623647e9
commit 48659aa221
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -566,6 +566,7 @@ (define* (run-file-textbox-page #:key
(const #t))
(exit-button-callback-procedure
(const #t)))
(let loop ()
(let* ((info-textbox
(make-reflowed-textbox -1 -1 info-text
info-textbox-width
@ -594,7 +595,9 @@ (define* (run-file-textbox-page #:key
'())))))
(form (make-form)))
(let loop ()
(add-form-to-grid grid form #t)
(make-wrapped-grid-window grid title)
(set-textbox-text file-textbox
(receive (_w _h text)
(reflow-text (read-all file)
@ -602,11 +605,9 @@ (define* (run-file-textbox-page #:key
0 0)
text))
(add-form-to-grid grid form #t)
(make-wrapped-grid-window grid title)
(receive (exit-reason argument)
(run-form form)
(define result
(dynamic-wind
(const #t)
(lambda ()
@ -622,6 +623,8 @@ (define* (run-file-textbox-page #:key
(components=? argument edit-button))
(edit-file file))))))
(lambda ()
(destroy-form-and-pop form))))
(if (components=? argument edit-button)
(loop)
(destroy-form-and-pop form))))))))
(loop) ;recurse in tail position
result)))))