refactor: add better error messages in winum config
This commit is contained in:
parent
710286b154
commit
3b12716c82
2 changed files with 4 additions and 3 deletions
|
|
@ -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.
|
||||
If prefix ARG is given, delete the window instead of selecting it."
|
||||
(interactive "P")
|
||||
(let ((n (if (winum-get-window-by-index '(popup . 0))
|
||||
'(popup . 0) '(popup . 10))))
|
||||
(let ((n (or (and (winum-get-window-by-index '(popup . 0)) '(popup . 0))
|
||||
(and (winum-get-window-by-index '(popup . 10)) '(popup . 10))
|
||||
(user-error "No window with index (popup . 0) or (popup . 10)"))))
|
||||
(if arg
|
||||
(winum-delete-window-by-index n)
|
||||
(winum-select-window-by-index n))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue