Skip to content

Commit dc57cdc

Browse files
vspinubbatsov
authored andcommitted
Preserve REPL names during the restart
Otherwise on each restart the deduplication postfix <2> is toggled back and forth.
1 parent 76d2e56 commit dc57cdc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cider-connection.el

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,9 @@ Assume that the current buffer is a REPL."
553553
(setq cider-repl-type type)
554554
(setq mode-name (format "REPL[%s]" type))
555555
(let ((params (cider--gather-connect-params)))
556+
;; We need to set current name to something else temporarily to avoid
557+
;; false name duplication in `nrepl-repl-buffer-name`.
558+
(rename-buffer (generate-new-buffer-name "*dummy-cider-repl-buffer*"))
556559
(rename-buffer (nrepl-repl-buffer-name params))
557560
(when (and nrepl-log-messages nrepl-messages-buffer)
558561
(with-current-buffer nrepl-messages-buffer

0 commit comments

Comments
 (0)