[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ELPA-diffs] [elpa] 02/14: Add option to wrap around selection in popup
From: |
emacs-devel |
Subject: |
[ELPA-diffs] [elpa] 02/14: Add option to wrap around selection in popup |
Date: |
Tue, 14 Jan 2014 20:57:06 +0000 |
This is an automated email from the git hooks/post-receive script.
root pushed a commit to branch master
in repository elpa.
commit b584759ed43a4a175706ca40b03dcebcf7b9ace9
Author: Ingo Lohmar <address@hidden>
Date: Fri Nov 1 03:02:24 2013 +0400
Add option to wrap around selection in popup
Close #39
---
company.el | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/company.el b/company.el
index ec0f2b3..b139b26 100644
--- a/company.el
+++ b/company.el
@@ -423,6 +423,12 @@ as if it was on this list."
:type '(choice (const :tag "off" nil)
(const :tag "on" t)))
+(defcustom company-selection-wrap-around nil
+ "If enabled, selecting item before first or after last wraps around."
+ :type '(choice (const :tag "off" nil)
+ (const :tag "on" t))
+ :group 'company)
+
(defvar company-end-of-buffer-workaround t
"Work around a visualization bug when completing at the end of the buffer.
The work-around consists of adding a newline.")
@@ -772,7 +778,10 @@ can retrieve meta-data for them."
frontend (error-message-string err) command)))))
(defun company-set-selection (selection &optional force-update)
- (setq selection (max 0 (min (1- company-candidates-length) selection)))
+ (setq selection
+ (if company-selection-wrap-around
+ (mod selection company-candidates-length)
+ (max 0 (min (1- company-candidates-length) selection))))
(when (or force-update (not (equal selection company-selection)))
(setq company-selection selection
company-selection-changed t)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
- [ELPA-diffs] [elpa] branch master updated (25219bd -> e6d8543), emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 10/14: * packages/company/company-etags.el: Require `cl' for `case'. * packages/company/company-oddmuse.el: Avoid `eval-when'., emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 02/14: Add option to wrap around selection in popup,
emacs-devel <=
- [ELPA-diffs] [elpa] 01/14: Include emacs22 in the Travis build again, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 03/14: company-elisp: enable in inferior-emacs-lisp-mode, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 05/14: Fix #43, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 09/14: company-capf: Perform sorting before prefix adjustment, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 04/14: company--should-complete: Don't check if we're in minibuffer, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 08/14: Fix http://debbugs.gnu.org/16334, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 06/14: Require cl before using cl, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 11/14: Replace company-elisp with company-capf, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 13/14: Fix a broken test, remove a duplicate one, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 12/14: Close #45, emacs-devel, 2014/01/14