File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1266,8 +1266,12 @@ Set this to nil to prevent truncation."
12661266(defun nrepl-messages-buffer (msg )
12671267 " Return or create the buffer for MSG.
12681268The default buffer name is *nrepl-messages session*."
1269- (let* ((msg-session (nrepl-dict-get msg " session" ))
1270- (msg-buffer-name (format nrepl-message-buffer-name-template msg-session)))
1269+ ; ; Log `new-session' replies to the "orphan" buffer, because that's probably
1270+ ; ; where we logged the request it's replying to.
1271+ (let* ((msg-session (or (unless (nrepl-dict-get msg " new-session" )
1272+ (nrepl-dict-get msg " session" ))
1273+ " 00000000-0000-0000-0000-000000000000" ))
1274+ (msg-buffer-name (format nrepl-message-buffer-name-template msg-session)))
12711275 (or (get-buffer msg-buffer-name)
12721276 (let ((buffer (get-buffer-create msg-buffer-name)))
12731277 (with-current-buffer buffer
You can’t perform that action at this time.
0 commit comments