Fix kill-this-buffer's dashboard addiction, the sequel

Again, the dashboard was being switched to too early (there were still
other real buffers to display).
This commit is contained in:
Henrik Lissner 2018-01-09 04:05:29 -05:00
parent 0e0966a4ce
commit d2bab1dc4d
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -531,11 +531,14 @@ instead)."
(let ((buf (current-buffer)))
(cond ((window-dedicated-p)
(delete-window))
((or (eq buf (doom-fallback-buffer))
(doom-real-buffer-p buf))
((eq buf (doom-fallback-buffer))
(bury-buffer)
(when (cdr (get-buffer-window-list))
(doom--cycle-real-buffers nil)))
((doom-real-buffer-p buf)
(doom--cycle-real-buffers -1)
(kill-buffer buf)
(when (cdr (get-buffer-window-list (current-buffer) nil t))
(when (cdr (get-buffer-window-list))
(doom--cycle-real-buffers nil)))
(t
(funcall orig-fn)))))