emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/sly 5a05c03 2/2: Fix #456: fix REPL output buffering bug


From: ELPA Syncer
Subject: [nongnu] elpa/sly 5a05c03 2/2: Fix #456: fix REPL output buffering bug
Date: Tue, 20 Jul 2021 17:57:21 -0400 (EDT)

branch: elpa/sly
commit 5a05c033197693462e67004549c24e0676eed53b
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    Fix #456: fix REPL output buffering bug
    
    This fixes these two situations:
    
      CL-USER> (print (read-line))
      hello
      hello
      "hello"
    
    and
    
      CL-USER> (loop (princ (eval (read))))
    
    The problem seems to have been introduced by the fix to #313, #319, #335.
    
       "Fix #313, #319, #335: Unbreak REPL reading "
    
    So this may not be the end of the story
    
    * contrib/sly-mrepl.el (:set-read-mode): Add back flushing.
---
 contrib/sly-mrepl.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/contrib/sly-mrepl.el b/contrib/sly-mrepl.el
index b21f155..54aba9c 100644
--- a/contrib/sly-mrepl.el
+++ b/contrib/sly-mrepl.el
@@ -237,6 +237,10 @@ for output printed to the REPL (not for evaluation 
results)")
              (add-text-properties (1- sly-mrepl--read-mark) (point)
                                   `(face bold read-only t)))
            (setq sly-mrepl--read-mark nil)
+           ;; github#456 need to flush any output that has overtaken
+           ;; the set-read-mode rpc.
+           (when sly-mrepl--pending-output
+             (sly-mrepl--insert-output "\n"))
            (sly-message "REPL back to normal evaluation mode")))))))
 
 (sly-define-channel-method listener :prompt (&rest prompt-args)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]