diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2016-11-08 06:50:20 +0100 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2016-11-08 08:15:04 +0100 |
commit | b624d95b5cc263aab3e9401cfbd0086cd22f5e99 (patch) | |
tree | cfe458a13e12fdd68d82685d5b262157c6921947 /helm-lib.el | |
parent | c8d2db8b89a2a94e3409c358afccd00e9a15e6a9 (diff) |
Fix PA in action buffer with follow enabled.
* helm.el (helm-show-action-buffer): Reenabled describe action.
(helm-execute-persistent-action): Don't run PA hook when action buffer is visible.
* helm-lib.el (helm-elisp--persistent-help):
Fix the selected window for PA from action window by
using the previous-window from helm-window.
* helm-regexp.el (helm-moccur-action): Ensure PA buffer is current (facultative).
Diffstat (limited to 'helm-lib.el')
-rw-r--r-- | helm-lib.el | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/helm-lib.el b/helm-lib.el index 42c306cd..14f2d45c 100644 --- a/helm-lib.el +++ b/helm-lib.el @@ -560,27 +560,28 @@ Add spaces at end if needed to reach WIDTH when STR is shorter than WIDTH." Argument NAME is used internally to know which command to use when symbol CANDIDATE refers at the same time to variable and a function. See `helm-elisp--show-help'." - (let ((hbuf (get-buffer (help-buffer)))) - (cond ((helm-follow-mode-p) - (if name - (funcall fun candidate name) - (funcall fun candidate))) - ((or (and (helm-attr 'help-running-p) - (string= candidate (helm-attr 'help-current-symbol)))) - (progn - ;; When started from a help buffer, - ;; Don't kill this buffer as it is helm-current-buffer. - (unless (equal hbuf helm-current-buffer) - (kill-buffer hbuf) - (set-window-buffer (get-buffer-window hbuf) - helm-current-buffer)) - (helm-attrset 'help-running-p nil))) - (t - (if name - (funcall fun candidate name) - (funcall fun candidate)) - (helm-attrset 'help-running-p t))) - (helm-attrset 'help-current-symbol candidate))) + (with-selected-window (previous-window (helm-window)) + (let ((hbuf (get-buffer (help-buffer)))) + (cond ((helm-follow-mode-p) + (if name + (funcall fun candidate name) + (funcall fun candidate))) + ((or (and (helm-attr 'help-running-p) + (string= candidate (helm-attr 'help-current-symbol)))) + (progn + ;; When started from a help buffer, + ;; Don't kill this buffer as it is helm-current-buffer. + (unless (equal hbuf helm-current-buffer) + (kill-buffer hbuf) + (set-window-buffer (get-buffer-window hbuf) + helm-current-buffer)) + (helm-attrset 'help-running-p nil))) + (t + (if name + (funcall fun candidate name) + (funcall fun candidate)) + (helm-attrset 'help-running-p t))) + (helm-attrset 'help-current-symbol candidate)))) (defun helm-find-function (func) "FUNC is symbol or string." |