diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2021-11-05 10:21:47 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2021-11-05 10:21:47 +0100 |
| commit | 92f4d3764ae1b75da2024bed12a906e740ea1b32 (patch) | |
| tree | ee70969eb6a19c3f5b6a02e2f169dd3e740c49c3 | |
| parent | 6647b7fc3dfdbc4b23740b3aea6c284576a82723 (diff) | |
Fix position computation, remove hack (Fix #69)
| -rw-r--r-- | corfu.el | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -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) |
