1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00

ctrl-d with readline exits one recursive repl instance

* module/ice-9/buffered-input.scm (make-buffered-input-port): Instead of
  always returning EOF once EOF is seen once, call the producer again.
  Allows Ctrl-D to cause one EOF at the REPL, returning once from a
  recursive edit, but input continues normally. Thanks to Andrew
  Bagdanov for a clue that led to the fix.
This commit is contained in:
Andy Wingo 2010-07-13 10:42:42 +02:00
parent dbb39d9c8b
commit 2f26a2266a
2 changed files with 5 additions and 1 deletions

1
THANKS
View file

@ -21,6 +21,7 @@ Contributors since the last release:
For fixes or providing information which led to a fix:
David Allouche
Andrew Bagdanov
Martin Baulig
Fabrice Bauzac
Sylvain Beucler

View file

@ -64,7 +64,10 @@ with @var{continuation?} set to @code{#t}."
(lambda ()
(cond
((eof-object? read-string)
read-string)
(let ((eof read-string))
(set! read-string "")
(set! string-index -1)
eof))
((>= string-index (string-length read-string))
(set! string-index -1)
(get-character))