Commit 6f94c240 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

Fix erc bug when there's two channels with the same name

* lisp/erc/erc.el (erc-generate-new-buffer-name): Fix logic when
there's two channels with the same name from two different servers
(bug#40121).
parent eab636c7
Pipeline #6197 failed with stage
in 58 minutes and 39 seconds
......@@ -1622,10 +1622,12 @@ symbol, it may have these values:
(if (and (not buffer-name)
erc-reuse-buffers
(or (not (get-buffer candidate))
(or target
(with-current-buffer (get-buffer candidate)
(and (erc-server-buffer-p)
(not (erc-server-process-alive)))))
;; Looking for a server buffer, so there's no target.
(and (not target)
(with-current-buffer (get-buffer candidate)
(and (erc-server-buffer-p)
(not (erc-server-process-alive)))))
;; Channel buffer; check that it's from the right server.
(with-current-buffer (get-buffer candidate)
(and (string= erc-session-server server)
(erc-port-equal erc-session-port port)))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment