Fix #2992: remove buffer-or-name check in switch-buffer executor

This commit is contained in:
Henrik Lissner 2020-04-29 00:33:54 -04:00
parent aca1599a81
commit c96bbf909c
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -105,10 +105,9 @@ size.")
(defun doom-run-switch-buffer-hooks-a (orig-fn buffer-or-name &rest args)
(let ((gc-cons-threshold most-positive-fixnum))
(if (or doom-inhibit-switch-buffer-hooks
(eq (current-buffer)
(get-buffer (or buffer-or-name
(if (eq orig-fn #'switch-to-buffer)
(other-buffer)))))
(and buffer-or-name
(eq (current-buffer)
(get-buffer buffer-or-name)))
(and (eq orig-fn #'switch-to-buffer) (car args)))
(apply orig-fn buffer-or-name args)
(let ((doom-inhibit-switch-buffer-hooks t)