Fix helm-M-x help popup not properly closing

On successive TAB presses on a command
This commit is contained in:
Henrik Lissner 2018-07-21 01:20:05 +02:00
parent 41cf970c75
commit 7f284e98b6
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -170,7 +170,16 @@ the command buffer."
;; `helm' ;; `helm'
(after! helm (after! helm
(setq helm-default-display-buffer-functions '(+popup-display-buffer-stacked-side-window)) (setq helm-default-display-buffer-functions '(+popup-display-buffer-stacked-side-window))
(set-popup-rule! "^\\*helm" :ignore t)) (set-popup-rule! "^\\*helm" :ignore t)
;; Fix left-over popup window when closing persistent help for `helm-M-x'
(defun +popup*helm-elisp--persistent-help (candidate fun &optional name)
(let (win)
(when (and (helm-attr 'help-running-p)
(string= candidate (helm-attr 'help-current-symbol))
(setq win (get-buffer-window (get-buffer (help-buffer)))))
(delete-window win))))
(advice-add #'helm-elisp--persistent-help :before #'+popup*helm-elisp--persistent-help))
;; `helm-ag' ;; `helm-ag'