From ac4a3965ea11c53c53de6d260f9e4900ef209880 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Sat, 8 Jun 2019 22:53:54 +0800 Subject: [PATCH] Revert (part of) last commit --- eldoc-box.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/eldoc-box.el b/eldoc-box.el index 2e119c3..4789eb4 100644 --- a/eldoc-box.el +++ b/eldoc-box.el @@ -245,6 +245,14 @@ WINDOW nil means use selected window." ;; normal, just return y + em (+ y em))))) +(defun eldoc-box--default-at-point-position-function (width height) + "Set `eldoc-box-position-function' to this function to have childframe appear under point. +Position is calculated base on WIDTH and HEIGHT of childframe text window." + (let* ((pos (eldoc-box--default-at-point-position-function-1 width height)) + (x (car pos)) + (y (cdr pos))) + (cons (or (eldoc-box--at-point-x-by-company) x) + y))) (defun eldoc-box--update-childframe-geometry (frame window) "Update the size and the position of childframe. FRAME is the childframe, WINDOW is the primary window."