refactor: better error messages
This commit is contained in:
parent
efa0aedb7c
commit
6094bb05f3
4
winum.el
4
winum.el
|
@ -258,7 +258,9 @@ Needed to detect scope changes at runtime.")
|
|||
"Jump to window 0, or window 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 0) 0 10)))
|
||||
(let ((n (or (and (winum-get-window-by-index 0) 0)
|
||||
(and (winum-get-window-by-index 10) 10)
|
||||
(user-error "No window with index 0 or 10"))))
|
||||
(if arg
|
||||
(winum-delete-window-by-index n)
|
||||
(winum-select-window-by-index n))))
|
||||
|
|
Loading…
Reference in a new issue