diff --git a/winum.el b/winum.el index 5ef6070..6088f4f 100644 --- a/winum.el +++ b/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))))