return empty string instead of nil when window does not exist
protects against potential errors being thrown and probably fixes #3 (although understanding the root cause is still necessary).
This commit is contained in:
parent
8e26306916
commit
3c28c0dd68
4
winum.el
4
winum.el
|
@ -324,7 +324,9 @@ WINDOW: if specified, the window of which we want to know the number.
|
|||
If not specified, the number of the currently selected window is
|
||||
returned."
|
||||
(let* ((n (winum-get-number window))
|
||||
(s (when (numberp n) (int-to-string n))))
|
||||
(s (if (numberp n)
|
||||
(int-to-string n)
|
||||
"")))
|
||||
(propertize s 'face 'winum-face)))
|
||||
|
||||
;;;###autoload
|
||||
|
|
Loading…
Reference in a new issue