From bd8b5d1f0f7c043c4bef2191a3def7b9fa3efacf Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 10 Oct 2022 08:51:31 -0400 Subject: Fix REPL log bug. --- starling/repl.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/starling/repl.scm b/starling/repl.scm index c04341e..551e2ad 100644 --- a/starling/repl.scm +++ b/starling/repl.scm @@ -44,7 +44,7 @@ (scene-mux #:getter scene-mux #:init-keyword #:scene-mux) (overlay-scene #:accessor overlay-scene #:init-keyword #:overlay-scene) (lines #:accessor lines #:init-form '()) - (log #:accessor log) + (log-lines #:accessor log-lines) (user-text #:accessor user-text #:init-form "") (module #:accessor module #:init-form (resolve-module '(guile-user)))) @@ -67,14 +67,14 @@ (define-method (print (repl ) s) (for-each (lambda (line) - (ring-buffer-put! (log repl) line)) + (ring-buffer-put! (log-lines repl) line)) (match (string-split s #\newline) ;; Drop trailing newlines ((lines ... "") lines) (lines lines)))) (define-method (flush-log (repl )) - (let ((log (log repl))) + (let ((log (log-lines repl))) (let loop ((i 0) (labels (lines repl))) (when (< i (ring-buffer-length log)) @@ -170,7 +170,7 @@ #:position (vec2 left-margin bottom-margin))) (apply attach-to repl line-nodes) (set! (lines repl) line-nodes) - (set! (log repl) (make-ring-buffer nlines)) + (set! (log-lines repl) (make-ring-buffer nlines)) (modify-user-text repl ""))) (define-method (update (repl ) dt) -- cgit v1.2.3