diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2024-11-15 06:22:21 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2024-11-15 06:28:33 +0100 |
| commit | 1529c30e2503c4a7e776201f190377cec3a6acd2 (patch) | |
| tree | c9e7e6190d83d96084876cf6f94743ce85961b86 | |
| parent | 915b6e45183be28648ddff1dccda044014a302f9 (diff) | |
corfu--popup-show: Minor cleanup
| -rw-r--r-- | corfu.el | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -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)))))) |
