[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 7280e19 050/348: ivy.el (ivy-completion-common-length): Fi
From: |
Oleh Krehel |
Subject: |
[elpa] master 7280e19 050/348: ivy.el (ivy-completion-common-length): Fix double insert bug |
Date: |
Sat, 8 Apr 2017 11:03:22 -0400 (EDT) |
branch: master
commit 7280e19734be92d1a3b2921e1dc36f9eaf4766bb
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy-completion-common-length): Fix double insert bug
The argument passed to `ivy-completion-common-length' looked like:
("js-indent-level"
0 12 (font-lock-face
completions-common-part)
12 13 (font-lock-face
completions-first-difference))
Note the `font-lock-face' property instead of the `face' property that
`ivy-completion-common-length' expected. The function now works with
both types.
Fixes #528
---
ivy.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/ivy.el b/ivy.el
index c68390c..91c89e5 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1653,14 +1653,18 @@ The previous string is between `ivy-completion-beg' and
`ivy-completion-end'."
(defun ivy-completion-common-length (str)
"Return the length of the first 'completions-common-part face in STR."
(let ((pos 0)
- (len (length str)))
+ (len (length str))
+ face-sym)
(while (and (<= pos len)
- (let ((prop (get-text-property pos 'face str)))
+ (let ((prop (or (prog1 (get-text-property pos 'face str)
+ (setq face-sym 'face))
+ (prog1 (get-text-property pos 'font-lock-face
str)
+ (setq face-sym 'font-lock-face)))))
(not (eq 'completions-common-part
(if (listp prop) (car prop) prop)))))
(setq pos (1+ pos)))
(if (< pos len)
- (or (next-single-property-change pos 'face str) len)
+ (or (next-single-property-change pos face-sym str) len)
0)))
(defun ivy-completion-in-region (start end collection &optional predicate)
- [elpa] master dc4a858 060/348: counsel.el (counsel-hydra-heads): New command, (continued)
- [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, 2017/04/08
- [elpa] master 7280e19 050/348: ivy.el (ivy-completion-common-length): Fix double insert bug,
Oleh Krehel <=
- [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
- [elpa] master e38b23c 091/348: Make counsel-ag extensible, Oleh Krehel, 2017/04/08