branch: externals/company commit d488122d18645a20a596490e3551194aecdea08a Author: Dmitry Gutov <dgu...@yandex.ru> Commit: Dmitry Gutov <dgu...@yandex.ru>
company-sort-by-occurrence: Check for empty strings Fixes #1105 --- company.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/company.el b/company.el index 1874c8f..7535dde 100644 --- a/company.el +++ b/company.el @@ -1671,7 +1671,8 @@ Keywords and function definition names are ignored." (cl-delete-if (lambda (candidate) (goto-char w-start) - (when (and (search-forward candidate w-end t) + (when (and (not (equal candidate "")) + (search-forward candidate w-end t) ;; ^^^ optimize for large lists where most elements ;; won't have a match. (catch 'done