[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 0a26144 280/399: ivy.el (ivy--highlight-default): Handle u
From: |
Oleh Krehel |
Subject: |
[elpa] master 0a26144 280/399: ivy.el (ivy--highlight-default): Handle unmatched groups |
Date: |
Sat, 20 Jul 2019 14:57:40 -0400 (EDT) |
branch: master
commit 0a261446ccad61f9307650db5a1652952a714fd1
Author: Andrew Whatson <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy--highlight-default): Handle unmatched groups
It's possible for a regex to have subexpressions which aren't matched,
and therefore have a nil beginning and end. These were raising an error
which aborted the highlight pass before it was finished.
---
ivy.el | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/ivy.el b/ivy.el
index 04820e6..c4a8384 100644
--- a/ivy.el
+++ b/ivy.el
@@ -3553,16 +3553,17 @@ Note: The usual last two arguments are flipped for
convenience.")
(setq start (match-end 0))
(let ((i 0))
(while (<= i ivy--subexps)
- (let ((face
- (cond ((zerop ivy--subexps)
- (cadr ivy-minibuffer-faces))
- ((zerop i)
- (car ivy-minibuffer-faces))
- (t
- (ivy--minibuffer-face i)))))
- (ivy-add-face-text-property
- (match-beginning i) (match-end i)
- face str))
+ (let ((beg (match-beginning i))
+ (end (match-end i)))
+ (when (and beg end)
+ (let ((face
+ (cond ((zerop ivy--subexps)
+ (cadr ivy-minibuffer-faces))
+ ((zerop i)
+ (car ivy-minibuffer-faces))
+ (t
+ (ivy--minibuffer-face i)))))
+ (ivy-add-face-text-property beg end face str))))
(cl-incf i)))))))
str)
- [elpa] master b65cdb5 274/399: counsel.el (counsel-compile): track build dir for the benefit of M-i, (continued)
- [elpa] master b65cdb5 274/399: counsel.el (counsel-compile): track build dir for the benefit of M-i, Oleh Krehel, 2019/07/20
- [elpa] master a18de2f 269/399: counsel.el (counsel-register): Add, Oleh Krehel, 2019/07/20
- [elpa] master fbf654c 276/399: counsel.el (counsel-company): Rely on company-prefix if company-common is nil, Oleh Krehel, 2019/07/20
- [elpa] master 2410219 284/399: swiper.el (swiper-isearch-highlight-delay): New defcustom, Oleh Krehel, 2019/07/20
- [elpa] master bc2dcbe 279/399: counsel.el (counsel--find-build-subdir): Simplify, Oleh Krehel, 2019/07/20
- [elpa] master 13da38a 287/399: ivy.el (ivy-help): Hide Org markup buffer-locally, Oleh Krehel, 2019/07/20
- [elpa] master 0134255 281/399: ivy.el (ivy--highlight-default): Use single face for adjacent groups, Oleh Krehel, 2019/07/20
- [elpa] master b7e9dfd 277/399: counsel.el: Fix a couple of typos, Oleh Krehel, 2019/07/20
- [elpa] master 92d5335 291/399: Add counsel-up-level command, Oleh Krehel, 2019/07/20
- [elpa] master 7e8622f 286/399: ivy.el (ivy-read-action): Fix, Oleh Krehel, 2019/07/20
- [elpa] master 0a26144 280/399: ivy.el (ivy--highlight-default): Handle unmatched groups,
Oleh Krehel <=
- [elpa] master 8905b8b 278/399: counsel.el: Pacify byte-compiler, Oleh Krehel, 2019/07/20
- [elpa] master af5b594 283/399: ivy.el (ivy--occur-insert-lines): Fix typo bug, Oleh Krehel, 2019/07/20
- [elpa] master 04f56ca 282/399: ivy.el (ivy--recompute-index): Use configured flx candidate limit, Oleh Krehel, 2019/07/20
- [elpa] master e69ddc3 295/399: ivy.el (ivy-sort-function-buffer): Unify prefix and star-prefix matches, Oleh Krehel, 2019/07/20
- [elpa] master f40b08a 293/399: ivy-display-function: obsolete this varible in favor ivy-display-functions-alist, Oleh Krehel, 2019/07/20
- [elpa] master 332f990 285/399: ivy.el: Fix compiler warning, Oleh Krehel, 2019/07/20
- [elpa] master 779db1e 292/399: ivy.el (ivy--occur-insert-lines): Add copy-sequence, Oleh Krehel, 2019/07/20
- [elpa] master a73e24d 288/399: Do not insert initial input if nil, Oleh Krehel, 2019/07/20
- [elpa] master 0b26219 301/399: counsel.el (counsel--file-name-filter): Move ignore-re binding., Oleh Krehel, 2019/07/20
- [elpa] master ef6d3db 297/399: ivy-overlay.el (ivy-display-function-overlay): Bring back org-indent-mode logic, Oleh Krehel, 2019/07/20