Take header line height into account in position calculation (#22)

This commit is contained in:
Yuan Fu 2019-10-03 09:39:20 -04:00
parent 5ca8a2cef5
commit 9196bfe858
No known key found for this signature in database
GPG Key ID: 56E19BC57664A442

View File

@ -253,8 +253,9 @@ WINDOW nil means use selected window."
(when pos-in-window (when pos-in-window
;; change absolute to relative to native frame ;; change absolute to relative to native frame
(let ((edges (window-edges window t nil t))) (let ((edges (window-edges window t nil t)))
(cons (+ (nth 0 edges) (nth 0 pos-in-window)) (cons (+ (nth 0 edges) (nth 0 pos-in-window)) ; x
(+ (nth 1 edges) (nth 1 pos-in-window))))))) (+ (nth 1 edges) (nth 1 pos-in-window)
(- (window-header-line-height window)))))))) ; y
(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'."