diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2016-07-23 18:32:09 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2016-07-23 18:32:09 +0200 |
commit | c70fa9d9303d4b1ad4a75c6c90eb040024a505a4 (patch) | |
tree | 808b728a0a7c9e7acba5ffd1f170cddaed6c6acd /helm.el | |
parent | 817dd9da836e2139fa1559ca02bb3bd8e4b397c3 (diff) |
Allow helm-follow-mode following current candidate after updating(fix #1568).
* helm.el (helm-follow-follow-on-update): New user var.
(helm--update-move-first-line): Use it.
(helm-output-filter--post-process): Maybe run persistent.
Diffstat (limited to 'helm.el')
-rw-r--r-- | helm.el | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -477,6 +477,11 @@ To make this behavior persistent across emacs sessions, set the :group 'helm :type 'boolean) +(defcustom helm-follow-follow-on-update nil + "Follow current candidate after each update when `helm-follow-mode' is enabled." + :group 'helm + :type 'boolean) + (defcustom helm-prevent-escaping-from-minibuffer t "Prevent escape from minibuffer during the helm session." :group 'helm @@ -3287,7 +3292,9 @@ to a particular place after finishing update." (defun helm--update-move-first-line () "Goto first line of `helm-buffer'." (goto-char (point-min)) - (helm-move-selection-common :where 'line :direction 'next :follow nil)) + (helm-move-selection-common :where 'line + :direction 'next + :follow helm-follow-follow-on-update)) (defun helm-force-update (&optional preselect) "Force recalculation and update of candidates. @@ -3462,6 +3469,8 @@ this additional info after the source name by overlay." (with-selected-window it (helm-skip-noncandidate-line 'next) (helm-mark-current-line) + (when helm-follow-follow-on-update + (helm-follow-execute-persistent-action-maybe)) (helm-display-mode-line (helm-get-current-source)) (helm-log-run-hook 'helm-after-update-hook)))) |