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
18
eldoc-box.el
18
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
|
||||||
|
((and (boundp 'company-pseudo-tooltip-overlay)
|
||||||
|
company-pseudo-tooltip-overlay)
|
||||||
(+ (* (frame-char-width)
|
(+ (* (frame-char-width)
|
||||||
(+ (overlay-get company-pseudo-tooltip-overlay 'company-width)
|
(+ (overlay-get company-pseudo-tooltip-overlay
|
||||||
(overlay-get company-pseudo-tooltip-overlay 'company-column)))
|
'company-width)
|
||||||
(or (line-number-display-width t) 0))
|
(overlay-get company-pseudo-tooltip-overlay
|
||||||
nil))
|
'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