diff --git a/CHANGELOG.md b/CHANGELOG.md index 494faf993..3213ac422 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ non-functioning `cider-test-jump` from test reports. * [#954](https://github.com/clojure-emacs/cider/issues/954): Detect properly a project's root when in buffer that's not visiting a file (e.g. a REPL buffer). * [#977](https://github.com/clojure-emacs/cider/issues/977): `cider-format-region` now respects indentation of the region start position +* [#979](https://github.com/clojure-emacs/cider/issues/979): Fixed the inspector buffer popping up needlessly. ## 0.8.2 / 2014-12-21 diff --git a/cider-inspector.el b/cider-inspector.el index bdafe7d47..169648152 100644 --- a/cider-inspector.el +++ b/cider-inspector.el @@ -81,25 +81,30 @@ (cider-emit-into-popup-buffer buffer "Oops")) '())) +(defun cider-inspector--popup-buffer () + (if (eq (current-buffer) cider-inspector-buffer) + current-buffer + (cider-popup-buffer cider-inspector-buffer t))) + (defun cider-inspect-sym (sym ns) - (let ((buffer (cider-popup-buffer cider-inspector-buffer t))) + (let ((buffer (cider-inspector--popup-buffer))) (nrepl-send-request (list "op" "inspect-start" "sym" sym "ns" ns) (cider-render-response buffer)))) (defun cider-inspector-pop () (interactive) - (let ((buffer (cider-popup-buffer cider-inspector-buffer t))) + (let ((buffer (cider-inspector-popup-buffer))) (nrepl-send-request (list "op" "inspect-pop") (cider-render-response buffer)))) (defun cider-inspector-push (idx) - (let ((buffer (cider-popup-buffer cider-inspector-buffer t))) + (let ((buffer (cider-inspector-popup-buffer))) (nrepl-send-request (list "op" "inspect-push" "idx" (number-to-string idx)) (cider-render-response buffer)))) (defun cider-inspector-refresh () (interactive) - (let ((buffer (cider-popup-buffer cider-inspector-buffer t))) + (let ((buffer (cider-inspector-popup-buffer))) (nrepl-send-request (list "op" "inspect-refresh") (cider-render-response buffer))))