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

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

[elpa] 01/06: company-clang--build-location: try to be more careful with


From: Dmitry Gutov
Subject: [elpa] 01/06: company-clang--build-location: try to be more careful with encoding
Date: Tue, 25 Mar 2014 04:46:28 +0000

dgutov pushed a commit to branch master
in repository elpa.

commit 9b5cad16b89a9ef22ab2ab206b5cb3cff560b619
Author: Dmitry Gutov <address@hidden>
Date:   Fri Mar 21 06:47:30 2014 +0200

    company-clang--build-location: try to be more careful with encoding
    
    http://lists.gnu.org/archive/html/emacs-devel/2014-03/msg00656.html
---
 company-clang.el |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/company-clang.el b/company-clang.el
index b101c41..787ecef 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -196,9 +196,12 @@ or automatically through a custom 
`company-clang-prefix-guesser'."
     (format "%s:%d:%d"
             (if (company-clang--auto-save-p) buffer-file-name "-")
             (line-number-at-pos)
-            (1+ (string-bytes (buffer-substring
-                               (line-beginning-position)
-                               (point)))))))
+            (1+ (length
+                 (encode-coding-region
+                  (line-beginning-position)
+                  (point)
+                  'utf-8
+                  t))))))
 
 (defsubst company-clang--build-complete-args (pos)
   (append '("-cc1" "-fsyntax-only" "-code-completion-macros")



reply via email to

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