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

    Fix wrong x value returned by popon-x-y-at-pos
---
 popon.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/popon.el b/popon.el
index 9181d1baf5..c883082f0b 100644
--- a/popon.el
+++ b/popon.el
@@ -546,7 +546,8 @@ NOTE: This uses `posn-at-point', which is slow.  So try to 
minimize calls
 to this function."
   (let ((window-start-x-y (posn-col-row (posn-at-point (window-start))))
         (point-x-y (posn-col-row (posn-at-point point))))
-    (cons (- (car point-x-y) (car window-start-x-y))
+    (cons (- (save-excursion (goto-char point) (current-column))
+             (window-hscroll))
           (- (cdr point-x-y) (cdr window-start-x-y)))))
 
 ;;;###autoload

Reply via email to