]> rhodes.io Git - swankr.git/commitdiff
Christophe Weblog Wiki Code Publications Music
fix swank-media repl-result-maker for complex
authorChristophe Rhodes <csr21@cantab.net>
Sun, 23 Oct 2011 09:50:16 +0000 (10:50 +0100)
committerChristophe Rhodes <csr21@cantab.net>
Sun, 23 Oct 2011 09:50:16 +0000 (10:50 +0100)
There ought to be some way of catching this mistake, which is passing
a non-length-1 vector to the swank functions, which then vectorise and
confuse the event stream.

swank-media.R

index 1d7071d0a8b06e7b415a03138e91d43dfcf1482f..59f7d772e9c2e9e67f664b522c180981fa84ef78 100644 (file)
@@ -30,7 +30,7 @@ makeMediaReplResult.numeric <- function(value) {
   list(quote(`:write-string`), string, quote(`:repl-result`))
 }
 makeMediaReplResult.complex <- function(value) {
-  string <- deparse(value)
+  string <- paste(deparse(value), sep="", collapse="\n")
   list(quote(`:write-string`), string, quote(`:repl-result`))
 }