branch: elpa/helm
commit 3b41395fd0a8771a76c109a402872144f6d92f8a
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>
Ensure we are in minibuffer when we reuse its prompt
---
helm-mode.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/helm-mode.el b/helm-mode.el
index bf30c0b0ba..dbc583478e 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -2764,8 +2764,13 @@ Can be used for `completion-in-region-function' by
advicing it with an
(result (if (stringp data)
data
(helm-comp-read
- ;; Completion-at-point and friends have no prompt.
- (or (minibuffer-prompt) "Pattern: ")
+ ;; Completion-at-point and friends have no prompt,
+ ;; we have a prompt only with CRM, in this case
+ ;; reuse it. Handle the case where user switched
out
+ ;; of minibuffer, leaving an active minibuffer
open.
+ (or (and (minibufferp (current-buffer))
+ (minibuffer-prompt))
+ "Pattern: ")
data
:name str-command
:nomark (null crm)