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

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

[elpa] externals/company 7c25cf4 34/46: company-set-selection: adding of


From: Dmitry Gutov
Subject: [elpa] externals/company 7c25cf4 34/46: company-set-selection: adding offset internally instead of via caller
Date: Wed, 30 Dec 2020 18:33:10 -0500 (EST)

branch: externals/company
commit 7c25cf4358ec98e2c9ec83d6a16475d7317960d3
Author: Kien Nguyen <kien.n.quang@gmail.com>
Commit: Kien Nguyen <kien.n.quang@gmail.com>

    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]