Merge pull request #2779 from seanfarley/irc-buffer-state
irc: only use the switch buffer logic during creation
This commit is contained in:
commit
657bf209cb
1 changed files with 8 additions and 6 deletions
|
@ -7,12 +7,14 @@
|
||||||
(not inhibit-workspace))
|
(not inhibit-workspace))
|
||||||
(+workspace-switch +irc--workspace-name 'auto-create))
|
(+workspace-switch +irc--workspace-name 'auto-create))
|
||||||
(let ((buffers (doom-buffers-in-mode 'circe-mode nil t)))
|
(let ((buffers (doom-buffers-in-mode 'circe-mode nil t)))
|
||||||
|
(if (not (member (window-buffer) buffers))
|
||||||
(if buffers
|
(if buffers
|
||||||
(ignore (switch-to-buffer (car buffers)))
|
(ignore (switch-to-buffer (car buffers)))
|
||||||
(require 'circe)
|
(require 'circe)
|
||||||
(delete-other-windows)
|
(delete-other-windows)
|
||||||
(switch-to-buffer (doom-fallback-buffer))
|
(switch-to-buffer (doom-fallback-buffer))
|
||||||
t)))
|
t)
|
||||||
|
(user-error "IRC buffer is already active and selected"))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun =irc (&optional inhibit-workspace)
|
(defun =irc (&optional inhibit-workspace)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue