Skip to content

Commit 7f67cb4

Browse files
rfkmcap10morgan
authored andcommitted
Avoid killed-buffer reference on restart
1 parent a6cbd80 commit 7f67cb4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
### Bugs fixed
88

9+
* [#1450](https://github.com/clojure-emacs/cider/pull/1450): Fix an error in `cider-restart` caused by a reference to a killed buffer.
910
* [#1459](https://github.com/clojure-emacs/cider/issues/1459): Add support for dynamic dispatch in scratch buffers.
1011
* [#1466](https://github.com/clojure-emacs/cider/issues/1466): Correctly font-lock pretty-printed results in the REPL.
1112
* [#1475](https://github.com/clojure-emacs/cider/pull/1475): Fix `args-out-of-range` error in `cider--get-symbol-indent`.

cider-interaction.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,12 +1553,13 @@ and all ancillary CIDER buffers."
15531553

15541554
(defun cider--restart-connection (conn)
15551555
"Restart the connection CONN."
1556-
(let ((project-dir (with-current-buffer conn nrepl-project-dir)))
1556+
(let ((project-dir (with-current-buffer conn nrepl-project-dir))
1557+
(buf-name (buffer-name conn)))
15571558
(cider--quit-connection conn)
15581559
;; Workaround for a nasty race condition https://github.com/clojure-emacs/cider/issues/439
15591560
;; TODO: Find a better way to ensure `cider-quit' has finished
15601561
(message "Waiting for CIDER connection %s to quit..."
1561-
(cider-propertize-bold (buffer-name conn)))
1562+
(cider-propertize-bold buf-name))
15621563
(sleep-for 2)
15631564
(if project-dir
15641565
(let ((default-directory project-dir))

0 commit comments

Comments
 (0)