[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/corfu 4e54225cd2 2/2: corfu-popupinfo: Use larger y-lim
From: |
ELPA Syncer |
Subject: |
[elpa] externals/corfu 4e54225cd2 2/2: corfu-popupinfo: Use larger y-limit for size computation |
Date: |
Sun, 5 Feb 2023 15:57:25 -0500 (EST) |
branch: externals/corfu
commit 4e54225cd25157f6b8cbbc69644b0d9f209030f6
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
corfu-popupinfo: Use larger y-limit for size computation
Sometimes the first lines of the documentation are shorter than the
following text, which led to wrapping when scrolling the popup.
---
extensions/corfu-popupinfo.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/extensions/corfu-popupinfo.el b/extensions/corfu-popupinfo.el
index 6a46eddfb6..c44169d534 100644
--- a/extensions/corfu-popupinfo.el
+++ b/extensions/corfu-popupinfo.el
@@ -242,7 +242,9 @@ all values are in pixels relative to the origin. See
((window-buffer) (current-buffer))
(size (window-text-pixel-size
nil (point-min) (point-max)
- max-width max-height)))
+ ;; Use 3*max-height as y-limit, to take more text
+ ;; into account.
+ max-width (* 3 max-height))))
;; Check that width is not exceeded. Otherwise use full height,
;; since lines will get wrapped.
(when (<= (car size) max-width)