Add support for company-box
* eldoc-box.el (eldoc-box--at-point-x-by-company): Change if to a cond and add a branch for company-box.
This commit is contained in:
parent
f6ae0e7a7b
commit
b5aa481432
20
eldoc-box.el
20
eldoc-box.el
@ -669,15 +669,23 @@ instead."
|
|||||||
|
|
||||||
;; please compiler
|
;; please compiler
|
||||||
(defvar company-pseudo-tooltip-overlay)
|
(defvar company-pseudo-tooltip-overlay)
|
||||||
|
(declare-function company-box--get-frame "company-box")
|
||||||
|
|
||||||
(defun eldoc-box--at-point-x-by-company ()
|
(defun eldoc-box--at-point-x-by-company ()
|
||||||
"Return the x position that accommodates company's popup."
|
"Return the x position that accommodates company's popup."
|
||||||
(if (and (featurep 'company) company-pseudo-tooltip-overlay)
|
(cond
|
||||||
(+ (* (frame-char-width)
|
((and (boundp 'company-pseudo-tooltip-overlay)
|
||||||
(+ (overlay-get company-pseudo-tooltip-overlay 'company-width)
|
company-pseudo-tooltip-overlay)
|
||||||
(overlay-get company-pseudo-tooltip-overlay 'company-column)))
|
(+ (* (frame-char-width)
|
||||||
(or (line-number-display-width t) 0))
|
(+ (overlay-get company-pseudo-tooltip-overlay
|
||||||
nil))
|
'company-width)
|
||||||
|
(overlay-get company-pseudo-tooltip-overlay
|
||||||
|
'company-column)))
|
||||||
|
(or (line-number-display-width t) 0)))
|
||||||
|
((and (boundp 'company-box--x) (numberp company-box--x))
|
||||||
|
(+ company-box--x
|
||||||
|
(frame-pixel-width (company-box--get-frame))))
|
||||||
|
(t nil)))
|
||||||
|
|
||||||
;;;; Markdown compatibility
|
;;;; Markdown compatibility
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user