Add +helm--set-prompt-display
This commit is contained in:
parent
5e49239ff2
commit
6536637cec
1 changed files with 28 additions and 0 deletions
|
@ -58,3 +58,31 @@
|
||||||
(let ((helm-ag-base-command "rg --no-heading --maxdepth 1"))
|
(let ((helm-ag-base-command "rg --no-heading --maxdepth 1"))
|
||||||
(+helm--file-search beg end query default-directory
|
(+helm--file-search beg end query default-directory
|
||||||
(if bang (list "-uu")))))
|
(if bang (list "-uu")))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +helm--set-prompt-display (pos)
|
||||||
|
"TODO"
|
||||||
|
(let (beg state region-active m)
|
||||||
|
(with-selected-window (minibuffer-window)
|
||||||
|
(setq beg (save-excursion (vertical-motion 0 (helm-window)) (point))
|
||||||
|
state evil-state
|
||||||
|
region-active (region-active-p)
|
||||||
|
m (mark t)))
|
||||||
|
(when region-active
|
||||||
|
(setq m (- m beg))
|
||||||
|
;; Increment pos to handle the space before prompt (i.e `pref').
|
||||||
|
(put-text-property (1+ (min m pos)) (+ 2 (max m pos))
|
||||||
|
'face
|
||||||
|
(list :background (face-background 'region))
|
||||||
|
header-line-format))
|
||||||
|
(put-text-property
|
||||||
|
;; Increment pos to handle the space before prompt (i.e `pref').
|
||||||
|
(+ 1 pos) (+ 2 pos)
|
||||||
|
'face
|
||||||
|
(if (eq state 'insert)
|
||||||
|
'underline
|
||||||
|
;; Don't just use 'cursor, this can hide the current character.
|
||||||
|
(list :inverse-video t
|
||||||
|
:foreground (face-background 'cursor)
|
||||||
|
:background (face-background 'default)))
|
||||||
|
header-line-format)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue