Skip to content

Commit

Permalink
make sure append-text is on edt
Browse files Browse the repository at this point in the history
  • Loading branch information
arthuredelstein committed Jul 6, 2012
1 parent 0c088db commit 47895f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/clooj/brackets.clj
Expand Up @@ -25,7 +25,7 @@
\" (condp = c, \" p, \\ j, s)
\; (if (= c \newline) p s)
(condp = c
\" j \\ j \; j
\" j \\ j \; j ;"
\( j \[ j \{ j
\) p \] p \} p
s))))
Expand Down
9 changes: 5 additions & 4 deletions src/clooj/repl.clj
Expand Up @@ -309,8 +309,8 @@
current-ns)))

(defn restart-repl [app project-path]
(append-text (app :repl-out-text-area)
(str "\n=== RESTARTING " project-path " REPL ===\n"))
(awt-event (append-text (app :repl-out-text-area)
(str "\n=== RESTARTING " project-path " REPL ===\n")))
(when-let [proc (-> app :repl deref :proc)]
(.destroy proc))
(reset! (:repl app) (create-outside-repl (app :repl-out-writer) project-path (get-file-ns app)))
Expand All @@ -319,8 +319,9 @@
(defn switch-repl [app project-path]
(when (and project-path
(not= project-path (-> app :repl deref :project-path)))
(append-text (app :repl-out-text-area)
(str "\n\n=== Switching to " project-path " REPL ===\n"))
(awt-event
(append-text (app :repl-out-text-area)
(str "\n\n=== Switching to " project-path " REPL ===\n")))
(let [repl (or (get @repls project-path)
(create-outside-repl (app :repl-out-writer) project-path (get-file-ns app)))]
(reset! (:repl app) repl)
Expand Down

0 comments on commit 47895f1

Please sign in to comment.