[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/icomplete-vertical-mode-improvements eaba18c 3/3: * lisp/icomple
From: |
João Távora |
Subject: |
scratch/icomplete-vertical-mode-improvements eaba18c 3/3: * lisp/icomplete.el (icomplete--render-vertical): Simplify slightly. |
Date: |
Wed, 26 May 2021 07:40:59 -0400 (EDT) |
branch: scratch/icomplete-vertical-mode-improvements
commit eaba18cd3a90031ee318c161ba931b73b742c29d
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
* lisp/icomplete.el (icomplete--render-vertical): Simplify slightly.
---
lisp/icomplete.el | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 2cd42ea..abb13e5 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -742,16 +742,14 @@ Return a list of (COMP PREFIX SUFFIX)."
;;
(cl-loop
with preds = (and (null icomplete-rotate) icomplete--comp-predecessors)
+ with succs = (cdr comps)
with max-lines = (1- (min icomplete-prospects-height
(max-mini-window-height)))
- with succs = (cdr comps)
- with half = (truncate max-lines 2)
- with max-before = (+ half
- (- half
- (cl-loop for (_ . r) on comps
- repeat half
- while (listp r)
- count 1)))
+ with max-before = (- max-lines
+ (cl-loop for (_ . r) on comps
+ repeat (truncate max-lines 2)
+ while (listp r)
+ count 1))
with before = (list)
repeat max-lines
for neighbour = nil