branch: master commit 78e8d0a9616dc45ea8ac2bace32aeedba8c5f6d2 Author: Dmitry Gutov <dgu...@yandex.ru> Commit: Dmitry Gutov <dgu...@yandex.ru>
company-ispell: Filter returned candidates locally Resolves #284 --- company-ispell.el | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/company-ispell.el b/company-ispell.el index 1561bee..7334caa 100644 --- a/company-ispell.el +++ b/company-ispell.el @@ -60,8 +60,15 @@ If nil, use `ispell-complete-word-dict'." (interactive (company-begin-backend 'company-ispell)) (prefix (when (company-ispell-available) (company-grab-word))) - (candidates (lookup-words arg (or company-ispell-dictionary - ispell-complete-word-dict))) + (candidates + (let ((words (lookup-words arg (or company-ispell-dictionary + ispell-complete-word-dict))) + (completion-ignore-case t)) + (if (string= arg "") + ;; Small optimization. + words + ;; Work around issue #284. + (all-completions arg words)))) (sorted t) (ignore-case 'keep-prefix)))