Skip to content

Commit 430d24d

Browse files
committed
fix error on mode-line evaluation when a window has no number
1 parent 4970e27 commit 430d24d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

winum.el

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
;;
4040
;;; Code:
4141
;;
42-
;; FIXME: Error during redisplay: (eval (winum-get-number-string)) signaled
43-
;; (wrong-type-argument numberp nil) when opening a helm buffer.
4442
;; FIXME: when `winum-scope' is changed from frame-local to non-local in
4543
;; customize, the mode-line is messed up until next `winum-update'.
4644
;; FIXME: The mode-line's window number is not always up to date in all frames.
@@ -323,7 +321,8 @@ PREFIX must be a key sequence, like the ones returned by `kbd'."
323321
WINDOW: if specified, the window of which we want to know the number.
324322
If not specified, the number of the currently selected window is
325323
returned."
326-
(let ((s (int-to-string (winum-get-number window))))
324+
(let* ((n (winum-get-number window))
325+
(s (when (numberp n) (int-to-string n))))
327326
(propertize s 'face 'winum-face)))
328327

329328
;;;###autoload

0 commit comments

Comments
 (0)