emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/consult 53a1ed6025: consult--async-split: Add field pro


From: ELPA Syncer
Subject: [elpa] externals/consult 53a1ed6025: consult--async-split: Add field properties
Date: Sat, 4 Feb 2023 05:57:26 -0500 (EST)

branch: externals/consult
commit 53a1ed60252d58069f2245c2f7e0e05bf87b6758
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    consult--async-split: Add field properties
---
 consult.el | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/consult.el b/consult.el
index 9760bb457e..b93b4f15f9 100644
--- a/consult.el
+++ b/consult.el
@@ -1970,12 +1970,18 @@ SPLIT is the splitting function."
                      (funcall split action))
                     (async-len (length async-str))
                     (input-len (length action))
-                    (end (minibuffer-prompt-end)))
+                    (prompt (minibuffer-prompt-end))
+                    (field-beg prompt)
+                    (field-idx 0))
          ;; Highlight punctuation characters
-         (remove-list-of-text-properties end (+ end input-len) '(face))
+         (remove-list-of-text-properties prompt (+ prompt input-len) '(face 
field))
          (dolist (hl highlights)
-           (put-text-property (+ end (car hl)) (+ end (cdr hl))
-                              'face 'consult-async-split))
+           (put-text-property field-beg (+ prompt (cdr hl))
+                              'field field-idx)
+           (put-text-property (+ prompt (car hl)) (+ prompt (cdr hl))
+                              'face 'consult-async-split)
+           (setq field-beg (+ prompt (cdr hl))
+                 field-idx (1+ field-idx)))
          (funcall async
                   ;; Pass through if the input is long enough!
                   (if (or force (>= async-len consult-async-min-input))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]