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

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

[elpa] externals/corfu 59263bf 5/6: Hide scrollbar if there are fewer th


From: Protesilaos Stavrou
Subject: [elpa] externals/corfu 59263bf 5/6: Hide scrollbar if there are fewer than corfu-count candidates
Date: Sat, 17 Apr 2021 18:26:56 -0400 (EDT)

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

    Hide scrollbar if there are fewer than corfu-count candidates
---
 corfu.el | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/corfu.el b/corfu.el
index fc1fe29..4c623ae 100644
--- a/corfu.el
+++ b/corfu.el
@@ -216,12 +216,13 @@ If `line-spacing/=nil' or in text-mode, the background 
color is used instead.")
                     (if fancy (if (= row idx) lborder-curr lborder) " ")
                     line
                     (make-string (- width (string-width line)) 32)
-                    (if fancy
-                        (if (and lo (<= lo row (+ lo bar)))
-                            (if (= row idx) rbar-curr rbar)
-                          (if (= row idx) rborder-curr rborder))
-                      (propertize " " 'face (if (and lo (<= lo row (+ lo bar)))
-                                                'corfu-bar 'corfu-border))))))
+                    (cond
+                     (fancy (if (and lo (<= lo row (+ lo bar)))
+                                (if (= row idx) rbar-curr rbar)
+                              (if (= row idx) rborder-curr rborder)))
+                     (lo (propertize " " 'face (if (<= lo row (+ lo bar))
+                                                   'corfu-bar 'corfu-border)))
+                     (t " ")))))
           (add-face-text-property 0 (length str) (if (= row idx) 
'corfu-current 'corfu-background) 'append str)
           (push (concat
                  (truncate-string-to-width bufline col 0 32) str



reply via email to

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