          (max 25)
          (i 0)
          (continue t)
+         (buffers (doom/get-real-buffers (doom/get-buffers t)))
          destbuf)
     (setq destbuf
           (catch 'goto
-            (if (not (doom/get-real-buffers))
-                (throw 'goto doom-buffer)
+            (if (or (not buffers)
+                    (= (length buffers) 1))
+                (progn (message "No other buffers in workgroup")
+                       (throw 'goto (current-buffer)))
               (funcall move-func)
-              (while (not (and (doom/real-buffer-p)
-                               (doom/project-p)))
+              (while (not (memq (current-buffer) buffers))
                 (if (or (eq (current-buffer) start-buffer)
                         (>= i max))
                     (throw 'goto doom-buffer)

  "Kill buffer (but only bury scratch buffer), then switch to a real buffer. Only buries
the buffer if it is being displayed in another window."
  (interactive (list t))
  (cond ((doom/popup-p)
         (doom/popup-close))
        (t
         (if (> (length (get-buffer-window-list (current-buffer) nil t)) 1)
             (bury-buffer)
           (when (and buffer-file-name (buffer-modified-p))
             (if (yes-or-no-p "Buffer is unsaved, save it?")
                 (save-buffer)
               (set-buffer-modified-p nil)))
           (kill-buffer)
           (unless (doom/real-buffer-p)
             (doom/previous-real-buffer)))))
  t)

;;;###autoload
(defun doom/kill-unreal-buffers ()
  "Kill all buried, unreal buffers in current frame. See `doom-unreal-buffers'"
  (interactive)
  (let* ((all-buffers (doom/get-buffers))
         (real-buffers (doom/get-real-buffers all-buffers))
         (kill-list (--filter (not (memq it real-buffers))
                              (doom/get-buried-buffers all-buffers))))
    (mapc 'kill-buffer kill-list)
    (doom/kill-process-buffers)
    (message "Cleaned up %s buffers" (length kill-list))))

(defun doom/kill-process-buffers ()
  "Kill all buffers that represent running processes and aren't visible."
  (interactive)
  (let ((buffer-list (buffer-list))
        (killed-processes 0))
    (dolist (p (process-list))
      (let* ((process-name (process-name p))
