branch: master commit 1de463a564f90458e1b563a0532b607d93926f53 Author: Dmitry Gutov <dgu...@yandex.ru> Commit: Dmitry Gutov <dgu...@yandex.ru>
company--window-width: Account for display-line-numbers Fixes #724 --- company.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/company.el b/company.el index ad35411..4fafcc2 100644 --- a/company.el +++ b/company.el @@ -2601,6 +2601,8 @@ If SHOW-VERSION is non-nil, show the version in the echo area." ;; Account for the line continuation column. (when (zerop (cadr (window-fringes))) (cl-decf ww)) + (when (bound-and-true-p display-line-numbers) + (cl-decf ww (+ 2 (line-number-display-width)))) (unless (or (display-graphic-p) (version< "24.3.1" emacs-version)) ;; Emacs 24.3 and earlier included margins