emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/company dd92593 35/46: Merge pull request #1032 from ki


From: Dmitry Gutov
Subject: [elpa] externals/company dd92593 35/46: Merge pull request #1032 from kiennq/bug/company-selection-offset
Date: Wed, 30 Dec 2020 18:33:10 -0500 (EST)

branch: externals/company
commit dd925936f7c0bf00319c81e8caea1b3db63bb8b5
Merge: 5f5949b 7c25cf4
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: GitHub <noreply@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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]