summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2021-11-05 10:21:47 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2021-11-05 10:21:47 +0100
commit92f4d3764ae1b75da2024bed12a906e740ea1b32 (patch)
treeee70969eb6a19c3f5b6a02e2f169dd3e740c49c3
parent6647b7fc3dfdbc4b23740b3aea6c284576a82723 (diff)
Fix position computation, remove hack (Fix #69)
-rw-r--r--corfu.el11
1 files changed, 3 insertions, 8 deletions
diff --git a/corfu.el b/corfu.el
index c731f41..18aa287 100644
--- a/corfu.el
+++ b/corfu.el
@@ -384,14 +384,9 @@ completion began less than that number of seconds ago."
(apply #'max corfu-min-width
(mapcar #'string-width lines))))
(row 0)
- ;;; XXX HACK On Emacs 28 y-coordinate position computation is wrong if
- ;;; there exists a flymake underline overlay at that point. Therefore
- ;;; compute the y-coordinate at the line beginning.
- (x (or (car (posn-x-y (posn-at-point pos))) 0))
- (y (save-excursion
- (goto-char pos)
- (beginning-of-visual-line)
- (or (cdr (posn-x-y (posn-at-point))) 0))))
+ (pos (posn-x-y (posn-at-point pos)))
+ (x (or (car pos) 0))
+ (y (or (cdr pos) 0)))
(corfu--make-frame
(- x mw) y
(+ (* width cw) mw mw) (* (length lines) ch)