From d5584b66dffa1499956512498ac68ddb3eba5634 Mon Sep 17 00:00:00 2001 From: deb0ch Date: Mon, 9 Jan 2017 13:09:57 +0100 Subject: [PATCH] fix error when selecting nonexistent window number bug introduced by 4970e27 --- winum.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winum.el b/winum.el index 986d29b..689c8c7 100644 --- a/winum.el +++ b/winum.el @@ -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