From fcebfaa1415cc47de7c13c9ae17178058d3dca35 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Sat, 2 Nov 2019 00:09:10 -0400 Subject: [PATCH] Fix #15 Line numbers mode is the problem --- eldoc-box.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/eldoc-box.el b/eldoc-box.el index 8592189..85b5eb9 100644 --- a/eldoc-box.el +++ b/eldoc-box.el @@ -465,9 +465,10 @@ If (point) != last point, cleanup frame.") (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))) + (+ (* (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)) (provide 'eldoc-box)