refactor: add better error messages in winum config

This commit is contained in:
Kiana Sheibani 2024-11-14 01:10:44 -05:00
parent 710286b154
commit 3b12716c82
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
2 changed files with 4 additions and 3 deletions

View file

@ -2474,8 +2474,9 @@ If prefix ARG is given, delete the window instead of selecting it." n)
"Jump to popup window 0, or popup 10 if 0 is not assigned. "Jump to popup window 0, or popup 10 if 0 is not assigned.
If prefix ARG is given, delete the window instead of selecting it." If prefix ARG is given, delete the window instead of selecting it."
(interactive "P") (interactive "P")
(let ((n (if (winum-get-window-by-index '(popup . 0)) (let ((n (or (and (winum-get-window-by-index '(popup . 0)) '(popup . 0))
'(popup . 0) '(popup . 10)))) (and (winum-get-window-by-index '(popup . 10)) '(popup . 10))
(user-error "No window with index (popup . 0) or (popup . 10)"))))
(if arg (if arg
(winum-delete-window-by-index n) (winum-delete-window-by-index n)
(winum-select-window-by-index n)))) (winum-select-window-by-index n))))

@ -1 +1 @@
Subproject commit efa0aedb7c4c03fb287210cd248f5fad8d4442c9 Subproject commit 6094bb05f3a78687529b55674dbdd697e51e1c25