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

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

[elpa] 02/14: company--posn-col-row: use `posn-col-row'


From: Dmitry Gutov
Subject: [elpa] 02/14: company--posn-col-row: use `posn-col-row'
Date: Sat, 13 Sep 2014 12:18:57 +0000

dgutov pushed a commit to branch master
in repository elpa.

commit d65c53ecb5f1fafd6e33a4090c94e755c04a6e3f
Author: Dmitry Gutov <address@hidden>
Date:   Mon Sep 1 23:07:34 2014 +0400

    company--posn-col-row: use `posn-col-row'
    
    Fixes #175
---
 company-tests.el |    9 +++++++++
 company.el       |    2 +-
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/company-tests.el b/company-tests.el
index afd4156..32231b7 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -586,6 +586,15 @@
       (put-text-property (point-min) (point-max) 'line-prefix "  ")
       (should (= (company--column) 2)))))
 
+(ert-deftest company-column-with-tabs ()
+  :tags '(interactive)
+  (with-temp-buffer
+    (save-window-excursion
+      (set-window-buffer nil (current-buffer))
+      (insert "|\t|\t|\t(")
+      (let ((tab-width 8))
+        (should (= (company--column) 25))))))
+
 (ert-deftest company-plainify ()
   (let ((tab-width 8))
     (should (equal-including-properties
diff --git a/company.el b/company.el
index 239d16f..c70e615 100644
--- a/company.el
+++ b/company.el
@@ -785,7 +785,7 @@ means that `company-mode' is always turned on except in 
`message-mode' buffers."
   (push 31415926 unread-command-events))
 
 (defun company--posn-col-row (pos)
-  (let* ((col-row (posn-actual-col-row pos))
+  (let* ((col-row (posn-col-row pos))
          (col (car col-row))
          (row (cdr col-row)))
     (when header-line-format



reply via email to

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