summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2022-10-10 08:51:31 -0400
committerDavid Thompson <dthompson2@worcester.edu>2022-10-10 08:51:31 -0400
commitbd8b5d1f0f7c043c4bef2191a3def7b9fa3efacf (patch)
treee4a4a1946d94700e4093e553670a53811a7d0324
parent985939a0dea359aef37eea51ee083365720a1e23 (diff)
Fix REPL log bug.
-rw-r--r--starling/repl.scm8
1 files 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 <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 <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 <repl>) dt)