From 543c99f018f4d5762dde0745e88c8e501399a760 Mon Sep 17 00:00:00 2001 From: Jakub Jankiewicz Date: Mon, 5 Feb 2024 22:19:28 +0100 Subject: [PATCH] fix `(read)` in the Web REPL --- CHANGELOG.md | 1 + lib/js/terminal.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ea364eb6..08346cf58 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ * remove dependencies on `cond` from `-->` macro so you can use use `-->` inside `cond` * fix handling of recursive `flatten` `syntax-rules` macro [#304](https://github.com/jcubic/lips/issues/304) * fix syntax-rules macro that manipulate code (see tests/syntax.scm and undswap macro) +* fix `(read)` in the Web REPL ## 1.0.0-beta.18 ### Breaking diff --git a/lib/js/terminal.js b/lib/js/terminal.js index ba3e7efd1..f0aaf2bdd 100755 --- a/lib/js/terminal.js +++ b/lib/js/terminal.js @@ -28,6 +28,10 @@ var terminal = (function($) { }), // --------------------------------------------------------------------- stdin: lips.InputPort(function() { + setTimeout(() => { + // resume terminal wehn read called in REPL + term.resume(); + }, 0); return term.read(''); }), // ---------------------------------------------------------------------