summaryrefslogtreecommitdiff
path: root/corfu.el
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2024-11-01 16:42:52 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2024-11-01 16:42:52 +0100
commit19b063b401b4ae6d8394224f59d2a02170b8937c (patch)
tree2b4605cf23344e9238e1ef569669a59af166d4d6 /corfu.el
parentbc9ae494244e9d08e5352b9cfad09b519398337e (diff)
Ensure right-margin-width >= bar-width
Diffstat (limited to 'corfu.el')
-rw-r--r--corfu.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/corfu.el b/corfu.el
index 374b463..40ebe7c 100644
--- a/corfu.el
+++ b/corfu.el
@@ -1023,10 +1023,10 @@ A scroll bar is displayed from LO to LO+BAR."
(with-current-buffer (corfu--make-buffer " *corfu*")
(let* ((ch (default-line-height))
(cw (default-font-width))
- (bw (ceiling (* cw corfu-bar-width)))
(fringe (display-graphic-p))
(ml (ceiling (* cw corfu-left-margin-width)))
- (mr (ceiling (* cw corfu-right-margin-width)))
+ (bw (ceiling (* cw corfu-bar-width)))
+ (mr (max bw (ceiling (* cw corfu-right-margin-width))))
(marginl (and (> ml 0) (propertize " " 'display `(space :width (,ml)))))
(sbar (if fringe
#(" " 0 1 (display (right-fringe corfu--bar corfu-bar)))