branch: externals/ivy commit 4c370d66776bd5145264497408fc67ee2763df3c Author: José Júnior <jose.jun...@wildlifestudios.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
Refactored counsel-company simplifying and removing uneeded code. Fixes #2988 Fixes #2805 --- counsel.el | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/counsel.el b/counsel.el index 8c216e8533..7f7e6fd16a 100644 --- a/counsel.el +++ b/counsel.el @@ -369,23 +369,11 @@ Update the minibuffer with the amount of lines collected every (company-mode 1) (unless company-candidates (company-complete)) - (let ((len (cond ((let (l) - (and company-common - (string= company-common - (downcase - (buffer-substring - (- (point) (setq l (length company-common))) - (point)))) - (setq company-prefix company-common) - l))) - (company-prefix - (length company-prefix))))) - (when len - (setq ivy-completion-beg (- (point) len)) - (setq ivy-completion-end (point)) - (ivy-read "Candidate: " company-candidates - :action 'company-finish - :caller 'counsel-company)))) + (company--continue) + (when company-candidates + (ivy-read "Candidate: " company-candidates + :action 'company-finish + :caller 'counsel-company))) (ivy-configure 'counsel-company :display-transformer-fn #'counsel--company-display-transformer