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

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

[elpa] externals/corfu 1529c30e25 2/2: corfu--popup-show: Minor cleanup


From: ELPA Syncer
Subject: [elpa] externals/corfu 1529c30e25 2/2: corfu--popup-show: Minor cleanup
Date: Fri, 15 Nov 2024 00:57:59 -0500 (EST)

branch: externals/corfu
commit 1529c30e2503c4a7e776201f190377cec3a6acd2
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    corfu--popup-show: Minor cleanup
---
 corfu.el | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/corfu.el b/corfu.el
index 9e8b403641..9051aae96e 100644
--- a/corfu.el
+++ b/corfu.el
@@ -1057,7 +1057,6 @@ A scroll bar is displayed from LO to LO+BAR."
              (y (if (> (+ yb (* corfu-count ch) lh lh) (frame-pixel-height))
                     (- yb height lh border border)
                   yb))
-             (row 0)
              (bmp (logxor (1- (ash 1 mr)) (1- (ash 1 bw)))))
         (setq left-fringe-width (if fringe ml 0) right-fringe-width (if fringe 
mr 0))
         ;; Define an inverted corfu--bar face
@@ -1075,17 +1074,15 @@ A scroll bar is displayed from LO to LO+BAR."
         (with-silent-modifications
           (delete-region (point-min) (point-max))
           (apply #'insert
-           (cl-loop for line in lines collect
-                    (let ((str (concat
-                                marginl line
-                                (if (and lo (<= lo row (+ lo bar)))
-                                    (if (eq row curr) cbar sbar)
-                                  (and (eq row curr) cmargin))
-                                "\n")))
+           (cl-loop for row from 0 for line in lines collect
+                    (let ((str (concat marginl line
+                                       (if (and lo (<= lo row (+ lo bar)))
+                                           (if (eq row curr) cbar sbar)
+                                         (and (eq row curr) cmargin))
+                                       "\n")))
                       (when (eq row curr)
                         (add-face-text-property
                          0 (length str) 'corfu-current 'append str))
-                      (cl-incf row)
                       str)))
           (goto-char (point-min)))
         (setq corfu--frame (corfu--make-frame corfu--frame x y width 
height))))))



reply via email to

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