Skip to content

Commit 0521e04

Browse files
committed
[#1104] Clear the cached ns form on quit
1 parent 2c0ca62 commit 0521e04

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cider-interaction.el

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2102,7 +2102,13 @@ Quitting closes all active nREPL connections and kills all CIDER buffers."
21022102
(when connection
21032103
(nrepl-close connection)))
21042104
(message "All active nREPL connections were closed")
2105-
(cider-close-ancillary-buffers)))
2105+
(cider-close-ancillary-buffers)
2106+
;; clean the cached ns forms in all Clojure buffers
2107+
;; as we don't track which buffer is associated with
2108+
;; which connection we simply clean the cache for all buffers
2109+
(dolist (clojure-buffer (cider-util--clojure-buffers))
2110+
(with-current-buffer clojure-buffer
2111+
(setq cider--cached-ns-form nil)))))
21062112

21072113
(defun cider-restart (&optional prompt-project)
21082114
"Quit CIDER and restart it.

0 commit comments

Comments
 (0)