From e3d7b6eed9889cfd951dc379a4967d5aa09317b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Tue, 3 Aug 2021 11:36:14 +0200 Subject: [PATCH] Flush current-output-port after writing prompt to it On Unix-like operating systems stdio.h (which Cyclone seems to use internally) is line-buffered. As such, the prompt will only be written after a newline character is written (since the prompt itself doesn't contain a newline) which is probably not what was intended here. This commit fixes this issue by always flushing the current-output-port after writing the prompt string. --- scheme/repl.sld | 1 + 1 file changed, 1 insertion(+) diff --git a/scheme/repl.sld b/scheme/repl.sld index eed07c94..6643ae60 100644 --- a/scheme/repl.sld +++ b/scheme/repl.sld @@ -47,6 +47,7 @@ (newline) (repl)) (display "cyclone> ") + (flush-output-port) (let ((obj (read))) (if (eof-object? obj) (newline) ;; Quick way to exit REPL