mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-02 11:50:48 -08:00
Fix potential bug when no keys exist
Need to check for no keys before checking the number of keys on the first page in case the latter is nil
This commit is contained in:
parent
4717c88680
commit
23600ce6e1
1 changed files with 4 additions and 4 deletions
|
|
@ -894,15 +894,15 @@ value of `which-key-show-prefix'. SEL-WIN-WIDTH is passed to
|
|||
pages (reverse pages)
|
||||
first-page (car pages)
|
||||
first-page-str (concat prefix-string (car first-page)))
|
||||
(cond ((<= (car keys-per-page) 0) ; check first page
|
||||
(message "%s- which-key can't show keys: Settings and/or frame size are too restrictive." prefix-keys)
|
||||
(cons 0 0))
|
||||
(max-pages-reached
|
||||
(cond (max-pages-reached
|
||||
(error "Which-key reached the maximum number of pages")
|
||||
(cons 0 0))
|
||||
((<= (length formatted-keys) 0)
|
||||
(message "%s- which-key: no keys to display" prefix-keys)
|
||||
(cons 0 0))
|
||||
((<= (car keys-per-page) 0) ; check first page
|
||||
(message "%s- which-key can't show keys: Settings and/or frame size are too restrictive." prefix-keys)
|
||||
(cons 0 0))
|
||||
(t
|
||||
(if (eq which-key-popup-type 'minibuffer)
|
||||
(let (message-log-max) (message "%s" first-page-str))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue