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
|
||||
(defvar company-pseudo-tooltip-overlay)
|
||||
(declare-function company-box--get-frame "company-box")
|
||||
|
||||
(defun eldoc-box--at-point-x-by-company ()
|
||||
"Return the x position that accommodates company's popup."
|
||||
(if (and (featurep 'company) company-pseudo-tooltip-overlay)
|
||||
(+ (* (frame-char-width)
|
||||
(+ (overlay-get company-pseudo-tooltip-overlay 'company-width)
|
||||
(overlay-get company-pseudo-tooltip-overlay 'company-column)))
|
||||
(or (line-number-display-width t) 0))
|
||||
nil))
|
||||
(cond
|
||||
((and (boundp 'company-pseudo-tooltip-overlay)
|
||||
company-pseudo-tooltip-overlay)
|
||||
(+ (* (frame-char-width)
|
||||
(+ (overlay-get company-pseudo-tooltip-overlay
|
||||
'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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user