MultiMUD / clojure-lanterna

A Clojurey wrapper around the Lanterna terminal output library.
http://multimud.github.io/clojure-lanterna
217 stars 50 forks source link

Odd characters in Hello, World example #15

Closed eigenhombre closed 7 years ago

eigenhombre commented 9 years ago

When I run

(let [term (t/get-terminal :unix)]
  (t/in-terminal term
    (t/put-string term "Hello!  Press any key to end.")
    (t/get-key-blocking term)))

in text mode, I get funny characters:

screen shot 2015-01-18 at 12 04 39 pm

On OS-X, this happens when I :unix or :text. Haven't tried any other OS. It's not there when I :swing. Any thoughts?

Martin-S-Weber commented 7 years ago

Try running with lein trampoline run / lein trampoline repl. Leiningen performs an extra level of I/O redirection which renders the terminal helpless to actually interpret and reply to the escape codes.

MultiMUD commented 7 years ago

OP's :+1: makes me think this is resolved. Documentation now also explicitly states that examples should be run with lein trampoline.