fix: use window-buffer instead of current-buffer
This is because immediately after switching persps or using similar commands, the current-buffer is not the buffer that is displayed in the window.
This commit is contained in:
parent
167911ba7b
commit
023c2ec72c
1 changed files with 2 additions and 1 deletions
|
@ -242,7 +242,8 @@ localleader prefix."
|
|||
(defun doom-update-localleader-key-h ()
|
||||
"Set the localleader keys for the current major-mode."
|
||||
(set-keymap-parent doom-localleader-map
|
||||
(cdr (assq major-mode doom-localleader-map-alist))))
|
||||
(cdr (assq (buffer-local-value 'major-mode (window-buffer))
|
||||
doom-localleader-map-alist))))
|
||||
|
||||
(add-hook 'post-command-hook #'doom-update-localleader-key-h)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue