1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-05 05:21:26 -08:00

Move cursor code to setup

This commit is contained in:
justbur 2015-07-03 13:25:26 -04:00
parent 5af44458b7
commit 6875c207b8

View file

@ -178,6 +178,7 @@ Finally, show the buffer."
max-len-desc (1+ max-len-desc) ; pad with one character
formatted (which-key/format-matches
unformatted max-len-key max-len-desc)))
;; populate buffer
(with-current-buffer (get-buffer which-key--buffer)
(erase-buffer)
(setq buffer-width (which-key/buffer-width
@ -186,9 +187,8 @@ Finally, show the buffer."
formatted buffer-width))
(goto-char (point-min))
(which-key/replace-strings-from-alist
which-key-general-replacement-alist)
(setq-local cursor-type nil)
(setq-local cursor-in-non-selected-windows nil))
which-key-general-replacement-alist))
;; show buffer
(setq which-key--window (which-key/show-buffer
(which-key/buffer-height line-breaks)
buffer-width))
@ -203,6 +203,9 @@ Finally, show the buffer."
(require 's)
(require 'popwin)
(setq which-key--buffer (get-buffer-create which-key-buffer-name))
(with-current-buffer which-key--buffer
(setq-local cursor-type nil)
(setq-local cursor-in-non-selected-windows nil))
(setq which-key--setup-p t))
;; (defun which-key/show-buffer (height width)