ui/popup: refactor hacks
This commit is contained in:
parent
1f1f2c3ebf
commit
4489ce6b81
1 changed files with 15 additions and 16 deletions
|
@ -35,7 +35,7 @@
|
|||
;;
|
||||
|
||||
;; `company'
|
||||
(after! company
|
||||
(progn
|
||||
(defun +popup*dont-select-me (orig-fn &rest args)
|
||||
(let ((+popup--inhibit-select t))
|
||||
(apply orig-fn args)))
|
||||
|
@ -43,7 +43,7 @@
|
|||
|
||||
|
||||
;; `eshell'
|
||||
(after! eshell
|
||||
(progn
|
||||
(setq eshell-destroy-buffer-when-process-dies t)
|
||||
|
||||
;; When eshell runs a visual command (see `eshell-visual-commands'), it spawns
|
||||
|
@ -59,7 +59,7 @@
|
|||
|
||||
|
||||
;; `evil'
|
||||
(after! evil
|
||||
(progn
|
||||
(defun +popup*evil-command-window (hist cmd-key execute-fn)
|
||||
"The evil command window has a mind of its own (uses `switch-to-buffer'). We
|
||||
monkey patch it to use pop-to-buffer, and to remember the previous window."
|
||||
|
@ -150,7 +150,7 @@ the command buffer."
|
|||
|
||||
|
||||
;; `helpful'
|
||||
(after! helpful
|
||||
(progn
|
||||
;; Open link in origin window (non-popup) instead of inside the popup window.
|
||||
(defun +popup*helpful--navigate (button)
|
||||
(let ((path (substring-no-properties (button-get button 'path)))
|
||||
|
@ -183,7 +183,7 @@ the command buffer."
|
|||
|
||||
|
||||
;; `helm-ag'
|
||||
(after! helm-ag
|
||||
(progn
|
||||
(defun +helm*pop-to-buffer (orig-fn &rest args)
|
||||
(pop-to-buffer
|
||||
(save-window-excursion (apply orig-fn args)
|
||||
|
@ -290,8 +290,7 @@ instead of switch-to-buffer-*."
|
|||
|
||||
|
||||
;; `which-key'
|
||||
(after! which-key
|
||||
(setq which-key-popup-type 'custom
|
||||
(setq which-key-popup-type 'custom
|
||||
which-key-custom-popup-max-dimensions-function (lambda (_) (which-key--side-window-max-dimensions))
|
||||
which-key-custom-hide-popup-function #'which-key--hide-buffer-side-window
|
||||
which-key-custom-show-popup-function
|
||||
|
@ -300,7 +299,7 @@ instead of switch-to-buffer-*."
|
|||
(lambda (buffer alist)
|
||||
(+popup-display-buffer-stacked-side-window
|
||||
buffer (append '((vslot . -9999)) alist)))))
|
||||
(which-key--show-buffer-side-window act-popup-dim)))))
|
||||
(which-key--show-buffer-side-window act-popup-dim))))
|
||||
|
||||
|
||||
;; `windmove'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue