fix error when selecting nonexistent window number

bug introduced by 4970e27
This commit is contained in:
deb0ch 2017-01-09 13:09:57 +01:00
parent 430d24dd29
commit d5584b66df

View file

@ -312,7 +312,7 @@ PREFIX must be a key sequence, like the ones returned by `kbd'."
;;;###autoload
(defun winum-get-window-by-number (n)
"Return window numbered N if exists, nil otherwise."
(when (>= n 0) (< n (1+ winum--window-count))
(when (and (>= n 0) (< n (1+ winum--window-count)))
(aref (winum--get-window-vector) n)))
;;;###autoload