emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 1de463a 29/78: company--window-width: Account for display-


From: Dmitry Gutov
Subject: [elpa] master 1de463a 29/78: company--window-width: Account for display-line-numbers
Date: Sun, 18 Feb 2018 07:40:18 -0500 (EST)

branch: master
commit 1de463a564f90458e1b563a0532b607d93926f53
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]