 (defun +doom-dashboard|reposition-point ()
   "Trap the point in the buttons."
   (when (region-active-p)
-    (deactivate-mark t)
+    (setq deactivate-mark t)
     (when (bound-and-true-p evil-local-mode)
       (evil-change-to-previous-state)))
   (or (ignore-errors

                 (not (run-hook-with-args-until-success '+doom-dashboard-inhibit-functions)))
            force)
    (with-current-buffer (doom-fallback-buffer)
      (with-silent-modifications
        (let ((pt (point)))
          (unless (eq major-mode '+doom-dashboard-mode)

      (progn (goto-char (point-min))
             (forward-button 1))))

(defun +doom-dashboard|reload-maybe ()
  "Reload the dashboard or its state.

If this isn't a dashboard buffer, move along, but record its `default-directory'
if the buffer is real. See `doom-real-buffer-p' for an explanation for what
'real' means.

If this is the dashboard buffer, reload it completely."
  (cond ((+doom-dashboard-p (current-buffer))
         (let (+doom-dashboard-inhibit-refresh)
           (ignore-errors (+doom-dashboard-reload))))
        ((doom-real-buffer-p (current-buffer))
         (setq +doom-dashboard--last-cwd default-directory)
         (+doom-dashboard-update-pwd))))

(defun +doom-dashboard|reload-frame (_frame)
  "Reload the dashboard after a brief pause. This is necessary for new frames,
whose dimensions may not be fully initialized by the time this is run."
  (when (timerp +doom-dashboard--reload-timer)
    (cancel-timer +doom-dashboard--reload-timer)) ; in case this function is run rapidly
  (setq +doom-dashboard--reload-timer (run-with-timer 0.1 nil #'+doom-dashboard-reload t)))

(defun +doom-dashboard|resize (&rest _)
  "Recenter the dashboard, and reset its margins and fringes."
  (let (buffer-list-update-hook
        window-configuration-change-hook
        window-size-change-functions)
    (let ((windows (get-buffer-window-list (doom-fallback-buffer) nil t)))
      (dolist (win windows)
        (set-window-start win 0)
        (set-window-fringes win 0 0)
        (set-window-margins
         win (max 0 (/ (- (window-total-width win) +doom-dashboard--width) 2))))
      (when windows
        (with-current-buffer (doom-fallback-buffer)
          (save-excursion
            (with-silent-modifications
              (goto-char (point-min))
              (delete-region (line-beginning-position)
                             (save-excursion (skip-chars-forward "\n")
                                             (point)))
              (insert (make-string
                       (max 0 (- (/ (window-height (get-buffer-window)) 2)
                                 (round (/ (+ (count-lines (point-min) (point-max))
                                              (car +doom-dashboard-banner-padding))
                                           2))))
                       ?\n)))))))))

(defun +doom-dashboard|detect-project (&rest _)
  "Check for a `last-project-root' parameter in the perspective, and set the
