summaryrefslogtreecommitdiff
path: root/helm.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2017-04-21 16:17:08 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2017-04-21 16:17:08 +0200
commit4b27393c47d3ca0415a6c80c0df7f883facd7c46 (patch)
treee1f08df71175764b700c62a390eae52170b3dbab /helm.el
parentaf1b68fe7f57c059f585f11f63bdb220d7c121f2 (diff)
Prevent exiting with first candidate when display is not ready (#1750).
* helm.el: (helm-update): Reset helm--in-update only when candidates list is non--nil. (helm-maybe-exit-minibuffer): Hitting RET have maybe stopped update, reload it.
Diffstat (limited to 'helm.el')
-rw-r--r--helm.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/helm.el b/helm.el
index 08593c9b..930c576f 100644
--- a/helm.el
+++ b/helm.el
@@ -2856,7 +2856,7 @@ WARNING: Do not use this mode yourself, it is internal to helm."
helm-exit-idle-delay nil
(lambda () (setq helm--in-update nil))))
-(add-hook 'helm-after-update-hook #'helm--reset-update-flag)
+;; (add-hook 'helm-after-update-hook #'helm--reset-update-flag)
;; All candidates
@@ -3512,7 +3512,8 @@ without recomputing them, it should be a list of lists."
do (helm-render-source src mtc))
;; Move to first line only when there is matches
;; to avoid cursor moving upside down (issue #1703).
- (helm--update-move-first-line)))
+ (helm--update-move-first-line)
+ (helm--reset-update-flag)))
(let ((src (or source (helm-get-current-source))))
(unless (assq 'candidates-process src)
(helm-display-mode-line src)
@@ -3816,7 +3817,8 @@ this additional info after the source name by overlay."
;; FIXME Don't hardcode follow delay.
(helm-follow-execute-persistent-action-maybe 0.5)
(helm-display-mode-line (helm-get-current-source))
- (helm-log-run-hook 'helm-after-update-hook))))
+ (helm-log-run-hook 'helm-after-update-hook)
+ (helm--reset-update-flag))))
(defun helm-process-deferred-sentinel-hook (process event file)
"Defer remote processes in sentinels.
@@ -4538,8 +4540,10 @@ don't exit and send message 'no match'."
(with-helm-alive-p
(if (and (helm--updating-p)
(null helm--reading-passwd-or-string))
- (progn (message "[Display not ready]")
- (sit-for 0.5) (message nil))
+ (progn
+ (message "[Display not ready]")
+ (sit-for 0.5) (message nil)
+ (helm-update))
(helm-exit-minibuffer))))
(put 'helm-maybe-exit-minibuffer 'helm-only t)