[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 77fb030 052/348: ivy.el (ivy-completion-in-region): Fix co
From: |
Oleh Krehel |
Subject: |
[elpa] master 77fb030 052/348: ivy.el (ivy-completion-in-region): Fix common length longer than str |
Date: |
Sat, 8 Apr 2017 11:03:23 -0400 (EDT) |
branch: master
commit 77fb0301d198d3cbe1136e86b4cbd926de11f6a2
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy-completion-in-region): Fix common length longer than str
Example: (setq tab-indent) completes to `tab-always-indent' which has
'completion-common-length property longer than the original string.
Re #528
---
ivy.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/ivy.el b/ivy.el
index 91c89e5..30d9f0a 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1673,11 +1673,13 @@ The previous string is between `ivy-completion-beg' and
`ivy-completion-end'."
(str (buffer-substring-no-properties start end))
(completion-ignore-case case-fold-search)
(comps
- (completion-all-completions str collection predicate (- end start))))
+ (completion-all-completions str collection predicate (- end start)))
+ (len (min (ivy-completion-common-length (car comps))
+ (length str))))
(if (null comps)
(message "No matches")
(nconc comps nil)
- (setq ivy-completion-beg (- end (ivy-completion-common-length (car
comps))))
+ (setq ivy-completion-beg (- end len))
(setq ivy-completion-end end)
(if (null (cdr comps))
(if (string= str (car comps))
- [elpa] master 792b7b7 051/348: counsel.el (counsel-set-variable): New command, (continued)
- [elpa] master 792b7b7 051/348: counsel.el (counsel-set-variable): New command, Oleh Krehel, 2017/04/08
- [elpa] master dc4a858 060/348: counsel.el (counsel-hydra-heads): New command, Oleh Krehel, 2017/04/08
- [elpa] master cd8a570 062/348: Escape `%` chars if present in the symbol value, Oleh Krehel, 2017/04/08
- [elpa] master 97cf30d 063/348: Add multiple-cursors support to ivy-completion-in-region-action, Oleh Krehel, 2017/04/08
- [elpa] master 8c7a7fc 028/348: When reading file names, check preselect and initial-input compat, Oleh Krehel, 2017/04/08
- [elpa] master 5d0fec1 032/348: ivy.el: Fix some checkdoc warnings, Oleh Krehel, 2017/04/08
- [elpa] master 2e1cebc 036/348: counsel.el (counsel-bookmark): Add, Oleh Krehel, 2017/04/08
- [elpa] master a566403 044/348: ivy.el (ivy-read): Document all args, Oleh Krehel, 2017/04/08
- [elpa] master baf89c0 054/348: ivy-test.el (colir-color-parse): Add test, Oleh Krehel, 2017/04/08
- [elpa] master be24b57 049/348: Revert "ivy.el (ivy-completion-in-region): Fix double insert bug", Oleh Krehel, 2017/04/08
- [elpa] master 77fb030 052/348: ivy.el (ivy-completion-in-region): Fix common length longer than str,
Oleh Krehel <=
- [elpa] master 7280e19 050/348: ivy.el (ivy-completion-common-length): Fix double insert bug, Oleh Krehel, 2017/04/08
- [elpa] master 288723e 065/348: counsel.el (counsel-set-variable): Allow new symbols, Oleh Krehel, 2017/04/08
- [elpa] master fe32959 066/348: ivy.el (ivy--actionp): Fix lambda being considered a list of actions, Oleh Krehel, 2017/04/08
- [elpa] master b3cca57 057/348: Make ivy prompt face overriding modular, Oleh Krehel, 2017/04/08
- [elpa] master 6067454 068/348: Improve readability of imenu candidates, Oleh Krehel, 2017/04/08
- [elpa] master a300514 071/348: counsel.el (hydra-keyboard-quit): Declare function, Oleh Krehel, 2017/04/08
- [elpa] master e54aa18 067/348: Add prefix arg for action functions, Oleh Krehel, 2017/04/08
- [elpa] master 2ee5618 085/348: ivy.el: Add face customizations to ivy-switch-buffer, Oleh Krehel, 2017/04/08
- [elpa] master fe93cc6 084/348: counsel.el (counsel-M-x): Fix interaction with repeat, Oleh Krehel, 2017/04/08
- [elpa] master aaad354 088/348: counsel.el (counsel-find-file): Switch directory with "M-o b", Oleh Krehel, 2017/04/08