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

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

[elpa] 02/04: company-clang: handle multibyte chars between bol and poin


From: Dmitry Gutov
Subject: [elpa] 02/04: company-clang: handle multibyte chars between bol and point
Date: Wed, 19 Mar 2014 03:30:14 +0000

dgutov pushed a commit to branch master
in repository elpa.

commit cd6d821579dc5656377ba2eadb0f06db965b058f
Author: Dmitry Gutov <address@hidden>
Date:   Tue Mar 18 15:44:36 2014 +0200

    company-clang: handle multibyte chars between bol and point
    
    Thanks @Sarcasm!
---
 company-clang.el |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/company-clang.el b/company-clang.el
index cfd9cd4..b101c41 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -196,7 +196,9 @@ 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)
-            (- (point) (line-beginning-position) -1))))
+            (1+ (string-bytes (buffer-substring
+                               (line-beginning-position)
+                               (point)))))))
 
 (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]