[Top][All Lists]

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

feature/icomplete-vertical 361946d 2/3: Icomplete vertical respect icomp

From: Jimmy Aguilar Mena
Subject: feature/icomplete-vertical 361946d 2/3: Icomplete vertical respect icomplete-hide-common-prefix.
Date: Thu, 17 Sep 2020 20:52:27 -0400 (EDT)

branch: feature/icomplete-vertical
commit 361946d54b5b99ba92cdf81686df28817a897ebd
Author: Jimmy Aguilar Mena <spacibba@aol.com>
Commit: Jimmy Aguilar Mena <spacibba@aol.com>

    Icomplete vertical respect icomplete-hide-common-prefix.
    * lisp/icomplete.el (icomplete--vertical-prospects) : get the substring
    only in the first candidate by default (unconditionally for now) and use
    icomplete-hide-common-prefix for the others.
 lisp/icomplete.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 4c43330..b160abc 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -552,13 +552,15 @@ Conditions are:
          limit prospects comp)
     ;; First candidate
-    (when (and comps prefix-len icomplete-hide-common-prefix)
+    (when (and comps prefix-len)
       (push (icomplete--format-function (substring (pop comps) prefix-len)) 
       (setq prospects-rows-pixel (+ prospects-rows-pixel line-height)))
     ;; The others
     (while (and comps (not limit))
-      (setq comp (icomplete--format-function (substring (pop comps) 
+      (setq comp (icomplete--format-function (if icomplete-hide-common-prefix
+                                                 (substring (pop comps) 
+                                               (pop comps)))
             prospects-rows-pixel (+ prospects-rows-pixel line-height))
       (if (< prospects-rows-pixel prospects-max-height)

reply via email to

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