summaryrefslogtreecommitdiff
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 17:43:21 +0100
commit38acda3546b046151a560becfe56a53aa3e9d57a (patch)
tree50b7ea0c4713e07b4c3a5cdc81ab581184fb48c4
parente7a22ac6d6571c3b9269be56bd513996c38316c5 (diff)
Ensure right-margin-width >= bar-width
-rw-r--r--corfu.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/corfu.el b/corfu.el
index 6db0b7e..35a0c38 100644
--- a/corfu.el
+++ b/corfu.el
@@ -1017,10 +1017,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)))