Fix window position-finding
This commit is contained in:
parent
33b73c9169
commit
9137860707
11
eldoc-box.el
11
eldoc-box.el
@ -247,13 +247,12 @@ Position is calculated base on WIDTH and HEIGHT of childframe text window"
|
|||||||
The coordinate is relative to the native frame.
|
The coordinate is relative to the native frame.
|
||||||
|
|
||||||
WINDOW nil means use selected window."
|
WINDOW nil means use selected window."
|
||||||
(let* ((pos (posn-at-point point window))
|
(let* ((pos (pos-visible-in-window-p point window t))
|
||||||
(x-y (posn-x-y pos))
|
(x (car pos))
|
||||||
(window (posn-window pos))
|
(y (cadr pos))
|
||||||
(edges (window-body-pixel-edges window)))
|
(edges (window-body-pixel-edges window)))
|
||||||
(cons (+ (car x-y) (car edges))
|
(cons (+ x (car edges))
|
||||||
(+ (cdr x-y) (cadr edges)
|
(+ y (cadr edges)))))
|
||||||
(- (window-header-line-height window))))))
|
|
||||||
|
|
||||||
(defun eldoc-box--default-at-point-position-function-1 (width height)
|
(defun eldoc-box--default-at-point-position-function-1 (width height)
|
||||||
"See `eldoc-box--default-at-point-position-function'."
|
"See `eldoc-box--default-at-point-position-function'."
|
||||||
|
Loading…
Reference in New Issue
Block a user