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

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

[elpa] externals/corfu e5dad66 09/16: Use internal border


From: Protesilaos Stavrou
Subject: [elpa] externals/corfu e5dad66 09/16: Use internal border
Date: Wed, 28 Apr 2021 14:20:03 -0400 (EDT)

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

    Use internal border
---
 corfu.el | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/corfu.el b/corfu.el
index 8e329c5..b2ce31c 100644
--- a/corfu.el
+++ b/corfu.el
@@ -227,7 +227,7 @@ Set to nil in order to disable confirmation."
                (height . 0)
                (line-spacing . 0)
                (border-width . 0)
-               (internal-border-width . 0)
+               (internal-border-width . 1)
                (left-fringe . 0)
                (right-fringe . 0)
                (vertical-scroll-bars . nil)
@@ -242,7 +242,9 @@ Set to nil in order to disable confirmation."
                (minibuffer . nil)
                (visibility . nil)
                (no-special-glyphs . t))))
-      (set-window-buffer (frame-root-window corfu--frame) buffer))
+      (set-window-buffer (frame-root-window corfu--frame) buffer)
+      (set-face-background 'internal-border (face-attribute 'corfu-border 
:foreground) corfu--frame)
+      (redisplay)) ;; force face loading?
     (set-frame-position corfu--frame x y)
     (set-frame-size corfu--frame width height t)
     (make-frame-visible corfu--frame)))
@@ -251,11 +253,11 @@ Set to nil in order to disable confirmation."
   "Show LINES as popup at POS, with CURR highlighted and scrollbar from LO to 
LO+BAR."
   (let* ((cw (frame-char-width))
          (ch (frame-char-height))
-         (bw (* 3 (ceiling cw 5)))
-         (lborder (corfu--border bw ch 1 'corfu-border 'corfu-background))
-         (lborder-curr (corfu--border bw ch 1 'corfu-border 'corfu-current))
-         (rborder (corfu--border bw ch -1 'corfu-border 'corfu-background))
-         (rborder-curr (corfu--border bw ch -1 'corfu-border 'corfu-current))
+         (bw (ceiling cw 1.6))
+         (lborder (corfu--border bw ch 0 'corfu-border 'corfu-background))
+         (lborder-curr (corfu--border bw ch 0 'corfu-border 'corfu-current))
+         (rborder (corfu--border bw ch 0 'corfu-border 'corfu-background))
+         (rborder-curr (corfu--border bw ch 0 'corfu-border 'corfu-current))
          (rbar-curr (corfu--border bw ch (- (ceiling cw 4))
                                    'corfu-bar 'corfu-current))
          (rbar (corfu--border bw ch (- (ceiling cw 4))



reply via email to

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