From d75df875c9469cdfbfec5330bf01e6833f678e4c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 18 Mar 2018 15:17:20 -0400 Subject: [PATCH] Trap cursor in buttons better in dashboard #465 --- modules/ui/doom-dashboard/config.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/ui/doom-dashboard/config.el b/modules/ui/doom-dashboard/config.el index b6a240c8f..11634f68d 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -97,9 +97,12 @@ Possible values: (defun +doom-dashboard|reposition-point () "Trap the point in the buttons." - (unless (button-at (point)) - (or (+doom-dashboard/previous-button) - (+doom-dashboard/first-button)))) + (or (ignore-errors + (if (button-at (point)) + (forward-button 0) + (backward-button 1))) + (progn (goto-char (point-min)) + (forward-button 1)))) (defun +doom-dashboard|init () "Initializes Doom's dashboard."