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

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

[elpa] master 4884a5e 44/78: Fall back to earlier behavior with Clang <


From: Dmitry Gutov
Subject: [elpa] master 4884a5e 44/78: Fall back to earlier behavior with Clang < 4.0
Date: Sun, 18 Feb 2018 07:40:21 -0500 (EST)

branch: master
commit 4884a5e2f3f014174a73abe2890e8deabb56290e
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Fall back to earlier behavior with Clang < 4.0
    
    Fixes #749
---
 company-clang.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/company-clang.el b/company-clang.el
index e512178..439d1b7 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -1,6 +1,6 @@
 ;;; company-clang.el --- company-mode completion backend for Clang  -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2009, 2011, 2013-2016  Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2011, 2013-2017  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -263,7 +263,10 @@ or automatically through a custom 
`company-clang-prefix-guesser'."
   (apply 'company-clang--start-process
          prefix
          callback
-         (company-clang--build-complete-args (point))))
+         (company-clang--build-complete-args
+          (if (company-clang--check-version 4.0 9.0)
+              (point)
+            (- (point) (length prefix))))))
 
 (defun company-clang--prefix ()
   (if company-clang-begin-after-member-access



reply via email to

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