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

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

[nongnu] elpa/popon aed8ff598d 15/15: Take the fringe width into account


From: ELPA Syncer
Subject: [nongnu] elpa/popon aed8ff598d 15/15: Take the fringe width into account
Date: Sun, 22 May 2022 12:59:19 -0400 (EDT)

branch: elpa/popon
commit aed8ff598de620e9f5c2220c6c3a9c55d76e0751
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>

    Take the fringe width into account
---
 popon.el | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/popon.el b/popon.el
index 7348a09b41..7bef133754 100644
--- a/popon.el
+++ b/popon.el
@@ -396,10 +396,15 @@ When FORCE is non-nil, update all overlays."
                             (floor (window-screen-lines))))
                        (< (car (popon-position popon))
                           (- (window-width window)
-                               (if (fboundp 'line-number-display-width)
-                                   (with-selected-window window
-                                     (line-number-display-width))
-                                 0)))))
+                             (if (fboundp 'line-number-display-width)
+                                 (with-selected-window window
+                                   (line-number-display-width))
+                               0)
+                             (if (display-graphic-p)
+                                 (let ((fringes (window-fringes window)))
+                                   (/ (+ (car fringes) (cadr fringes))
+                                      (frame-char-width frame)))
+                               (if (zerop (window-hscroll)) 0 1))))))
                 (window-parameter window 'popon-list))))
           (when (or force
                     (not



reply via email to

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