branch: externals/company commit dd925936f7c0bf00319c81e8caea1b3db63bb8b5 Merge: 5f5949b 7c25cf4 Author: Dmitry Gutov <dgu...@yandex.ru> Commit: GitHub <nore...@github.com>
Merge pull request #1032 from kiennq/bug/company-selection-offset company-set-selection: adding offset internally instead of via caller --- company.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/company.el b/company.el index 09c2d46..57cf960 100644 --- a/company.el +++ b/company.el @@ -1203,6 +1203,7 @@ update if FORCE-UPDATE." (let* ((offset (if company-selection-default 0 1)) (company-candidates-length (+ company-candidates-length offset))) + (setq selection (+ selection offset)) (setq selection (if company-selection-wrap-around (mod selection company-candidates-length) @@ -2065,8 +2066,7 @@ meant for no selection." (let ((selection (+ (or arg 1) (or company-selection company-selection-default - -1) - (if company-selection-default 0 1)))) + -1)))) (company-set-selection selection)))) (defun company-select-previous (&optional arg)