]> code.delx.au - gnu-emacs-elpa/commitdiff
Support whitespace-mode newline-mark
authorDmitry Gutov <dgutov@yandex.ru>
Wed, 24 Jun 2015 10:34:41 +0000 (13:34 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Wed, 24 Jun 2015 10:34:41 +0000 (13:34 +0300)
Fixes #370

company.el

index 5c20c0516be6e57acae8e3893576c8024be04667..8500a4d93d20a32470b052f505ce4fdd00f7b8ed 100644 (file)
@@ -2400,6 +2400,10 @@ If SHOW-VERSION is non-nil, show the version in the echo area."
                (version< emacs-version "24.4.51.5"))
       ;; http://debbugs.gnu.org/18384
       (cl-decf ww))
+    ;; whitespace-mode with newline-mark
+    (when (and buffer-display-table
+               (aref buffer-display-table ?\n))
+      (cl-decf ww (1- (length (aref buffer-display-table ?\n)))))
     ww))
 
 (defun company--replacement-string (lines old column nl &optional align-top)