summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2016-10-09 20:47:53 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2016-10-10 06:38:40 +0200
commit986827e2d9c58e1781950609dd7d4fa44b33ed88 (patch)
tree69f341430dfed7d7b46b108125b451e4b1221b54
parent643d301a9985ee72329eeabf03d00e2ab03358c0 (diff)
Allow modifying prompt when showing actions.
* helm.el (helm-select-action): Do it. (helm--action-prompt): New use it.
-rw-r--r--helm.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/helm.el b/helm.el
index fa4243cf..128c5dc6 100644
--- a/helm.el
+++ b/helm.el
@@ -3558,6 +3558,7 @@ If action buffer is selected, back to the helm buffer."
(helm-acond ((get-buffer-window helm-action-buffer 'visible)
(set-window-buffer (get-buffer-window helm-action-buffer)
helm-buffer)
+ (helm--action-prompt 'restore)
(when (and helm-show-action-window-same-window
helm-always-two-windows)
(delete-window it))
@@ -3576,12 +3577,21 @@ If action buffer is selected, back to the helm buffer."
(helm-show-action-buffer actions)
;; Be sure the minibuffer is entirely deleted (#907).
(helm--delete-minibuffer-contents-from "")
+ (helm--action-prompt)
(helm-check-minibuffer-input))))
(t (message "No Actions available")))
(helm-display-mode-line (helm-get-current-source))
(run-hooks 'helm-window-configuration-hook))))))
(put 'helm-select-action 'helm-only t)
+(defun helm--action-prompt (&optional restore)
+ (with-selected-window (minibuffer-window)
+ (let ((inhibit-read-only t))
+ (if restore
+ (remove-text-properties (point-min) (point-max) '(display))
+ (add-text-properties (point-min) (point-max)
+ '(display "Select action: "))))))
+
(defcustom helm-show-action-window-same-window t
"Show action buffer beside `helm-buffer' when non-nil."
:group 'helm