emacs-diffs
[Top][All Lists]
Advanced

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

feature/icomplete-vertical 785d32a 18/20: Icomplete vertical respect ico


From: Jimmy Aguilar Mena
Subject: feature/icomplete-vertical 785d32a 18/20: Icomplete vertical respect icomplete-hide-common-prefix.
Date: Thu, 24 Sep 2020 22:58:23 -0400 (EDT)

branch: feature/icomplete-vertical
commit 785d32a2cf407af70d1693028dd4ee6a9f100203
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)) 
prospects)
       (setq prospects-rows-pixel (+ prospects-rows-pixel line-height)))
 
     ;; The others
     (while (and comps (not limit))
-      (setq comp (icomplete--format-function (substring (pop comps) 
prefix-len))
+      (setq comp (icomplete--format-function (if icomplete-hide-common-prefix
+                                                 (substring (pop comps) 
prefix-len)
+                                               (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]