Skip to content

Commit

Permalink
[Fix #1557] Give sibling connections lower priority than the original
Browse files Browse the repository at this point in the history
  • Loading branch information
Malabarba committed Feb 14, 2016
1 parent 9672dfa commit f0493a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ and try to associate the created connection with this project automatically.

### Bugs fixed

* [#1557](https://github.com/clojure-emacs/cider/issues/1557): When a sibling REPL is started by hasn't yet turned into a cljs REPL, it won't hijack clj requests.
* [#1562](https://github.com/clojure-emacs/cider/issues/1562): Actually disable cider-mode when it gets disabled.
* [#1540](https://github.com/clojure-emacs/cider/issues/1540): Fix cider-complete-at-point.
* [cider-nrepl#294](https://github.com/clojure-emacs/cider-nrepl/issues/294): Handle errors in the `complete-doc` nREPL op.
Expand Down
7 changes: 7 additions & 0 deletions cider.el
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,13 @@ should be the regular Clojure REPL started by the server process filter."
(cljs-proc (apply #'nrepl-start-client-process client-process-args))
(cljs-buffer (process-buffer cljs-proc)))
(with-current-buffer cljs-buffer
;; The new connection has now been bumped to the top, but it's still a clj
;; REPL! Additionally, some cljs REPLs can actually take a while to start
;; (some even depend on the user opening a browser). Meanwhile, this REPL
;; will gladly receive requests in place of the original clj REPL. Our
;; solution is to bump the original REPL back up the list, so it takes
;; priority on clj requests.
(cider-make-connection-default client-buffer)
(cider-nrepl-send-request
(list "op" "eval"
"ns" (cider-current-ns)
Expand Down

0 comments on commit f0493a1

Please sign in to comment.