mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-02 03:40:36 -08:00
Fix #79
Explicitly set word-wrap in which-key buffer. Fix unicode correction
This commit is contained in:
parent
864218b307
commit
e447eaf944
1 changed files with 9 additions and 6 deletions
15
which-key.el
15
which-key.el
|
|
@ -435,7 +435,8 @@ alongside the actual current key sequence when
|
|||
(message ""))
|
||||
(setq-local cursor-type nil)
|
||||
(setq-local cursor-in-non-selected-windows nil)
|
||||
(setq-local mode-line-format nil))))
|
||||
(setq-local mode-line-format nil)
|
||||
(setq-local word-wrap nil))))
|
||||
|
||||
(defun which-key--setup ()
|
||||
"Initial setup for which-key.
|
||||
|
|
@ -918,7 +919,7 @@ Measured in lines and characters respectively."
|
|||
max-mini-window-height))
|
||||
max-mini-window-height)
|
||||
;; width
|
||||
(frame-text-cols)))
|
||||
(max 0 (- (frame-text-cols) which-key-unicode-correction))))
|
||||
|
||||
(defun which-key--side-window-max-dimensions ()
|
||||
"Return max-dimensions of the side-window popup (height .
|
||||
|
|
@ -932,10 +933,12 @@ width) in lines and characters respectively."
|
|||
;; FIXME: change to something like (min which-*-height (calculate-max-height))
|
||||
(which-key--height-or-percentage-to-height which-key-side-window-max-height))
|
||||
;; width
|
||||
(if (member which-key-side-window-location '(left right))
|
||||
(which-key--total-width-to-text (which-key--width-or-percentage-to-width
|
||||
which-key-side-window-max-width))
|
||||
(frame-width))))
|
||||
(max 0
|
||||
(- (if (member which-key-side-window-location '(left right))
|
||||
(which-key--total-width-to-text (which-key--width-or-percentage-to-width
|
||||
which-key-side-window-max-width))
|
||||
(frame-width))
|
||||
which-key-unicode-correction))))
|
||||
|
||||
(defun which-key--frame-max-dimensions ()
|
||||
"Return max-dimensions of the frame popup (height .
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue