X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/cbfc00ff00589aaf8155ef1b0c21e6a3cd0d2f40..951b5e388108af26263a6ab6892391fea976a220:/packages/company/company-capf.el diff --git a/packages/company/company-capf.el b/packages/company/company-capf.el index b63002569..4962a26c0 100644 --- a/packages/company/company-capf.el +++ b/packages/company/company-capf.el @@ -138,9 +138,14 @@ (`init nil) ;Don't bother: plenty of other ways to initialize the code. (`post-completion (let* ((res (company--capf-data)) - (exit-function (plist-get (nthcdr 4 res) :exit-function))) + (exit-function (plist-get (nthcdr 4 res) :exit-function)) + (table (nth 3 res)) + (pred (plist-get (nthcdr 4 res) :predicate))) (if exit-function - (funcall exit-function arg 'finished)))) + ;; Follow the example of `completion--done'. + (funcall exit-function arg + (if (eq (try-completion arg table pred) t) + 'finished 'sole))))) )) (provide 'company-capf)