emacs-diffs
[Top][All Lists]
Advanced

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

scratch/icomplete-vertical-mode-improvements 206bf22 2/2: Properly apply


From: João Távora
Subject: scratch/icomplete-vertical-mode-improvements 206bf22 2/2: Properly apply icomplete-selected-match face
Date: Fri, 28 May 2021 06:55:13 -0400 (EDT)

branch: scratch/icomplete-vertical-mode-improvements
commit 206bf220cef0ba3cbfeb60cddaec2880976f69af
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    Properly apply icomplete-selected-match face
    
    * lisp/icomplete.el (icomplete--render-vertical): Properly apply
    icomplete-selected-match face.
---
 lisp/icomplete.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 8ed4111..25d165b 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -780,11 +780,12 @@ Return a list of (COMP PREFIX SUFFIX)."
    ;; Now figure out spacing and layout
    ;;
    (cl-loop
+    with selected = (substring (car comps))
+    initially (add-face-text-property 0 (length selected)
+                                      'icomplete-selected-match 'append 
selected)
     with torender
     = (nconc before
-             (list
-              (propertize (car comps) 'face
-                                'icomplete-selected-match))
+             (list selected)
              after)
     with triplets = (icomplete--affixate md torender)
     initially (when (eq triplets torender)



reply via email to

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