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

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

[elpa] 07/14: company-capf: fix when company-point is nil


From: Dmitry Gutov
Subject: [elpa] 07/14: company-capf: fix when company-point is nil
Date: Tue, 18 Feb 2014 05:51:02 +0000

dgutov pushed a commit to branch master
in repository elpa.

commit f93584ef1c9c1119dffc899af319d9638f72e055
Author: Dmitry Gutov <address@hidden>
Date:   Wed Feb 12 07:52:29 2014 +0200

    company-capf: fix when company-point is nil
---
 company-capf.el |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/company-capf.el b/company-capf.el
index 1a4342b..77479ae 100644
--- a/company-capf.el
+++ b/company-capf.el
@@ -104,7 +104,11 @@ Requires Emacs 24.1 or newer."
        (when f (funcall f arg))))
     (`annotation
      (save-excursion
-       (goto-char company-point)
+       ;; FIXME: `company-begin' sets `company-point' after calling
+       ;; `company--begin-new'.  We shouldn't rely on `company-point' here,
+       ;; better to cache the capf-data value instead.
+       (when company-point
+         (goto-char company-point))
        (let ((f (plist-get (nthcdr 4 (company--capf-data)) 
:annotation-function)))
          (when f (funcall f arg)))))
     (`require-match



reply via email to

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