   "Create a new eshell window below the current one."
   (interactive)
   (let ((ignore-window-parameters t)
+        (dedicated-p (window-dedicated-p))
         (+eshell-enable-new-shell-on-split
          (or +eshell-enable-new-shell-on-split (frame-parameter nil 'saved-wconf))))
     (select-window (split-window-vertically))
-    (+eshell--bury-buffer)))
+    (+eshell--bury-buffer dedicated-p)))
 
 ;;;###autoload
 (defun +eshell/split-right ()
   "Create a new eshell window to the right of the current one."
   (interactive)
   (let* ((ignore-window-parameters t)
+         (dedicated-p (window-dedicated-p))
          (window-state (window-state-get))
          (+eshell-enable-new-shell-on-split
           (or +eshell-enable-new-shell-on-split (frame-parameter nil 'saved-wconf))))
     (select-window (split-window-horizontally))
-    (+eshell--bury-buffer)))
+    (+eshell--bury-buffer dedicated-p)))
 
 ;;;###autoload
 (defun +eshell/switch-to-next ()

               (let ((prev (save-window-excursion (previous-buffer))))
                 (unless (and prev (doom-real-buffer-p prev))
                   (switch-to-buffer (doom-fallback-buffer)))))
              ((or (and (fboundp '+popup-window-p) (+popup-window-p))
                   +eshell-kill-window-on-exit)
               (delete-window win)))))))


    (ring-remove +eshell-buffers idx)
    t))

(defun +eshell--bury-buffer (&optional dedicated-p)
  (unless (switch-to-prev-buffer nil 'bury)
    (switch-to-buffer (doom-fallback-buffer)))
  (when +eshell-enable-new-shell-on-split
    (when-let* ((win (get-buffer-window (+eshell/open t))))
      (set-window-dedicated-p win dedicated-p))))

(defun +eshell--setup-window (window &optional flag)
  (when (window-live-p window)
