[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 8c1a2fa 107/399: Allow all re-builders to use ivy-highligh
From: |
Oleh Krehel |
Subject: |
[elpa] master 8c1a2fa 107/399: Allow all re-builders to use ivy-highlight-grep-commands |
Date: |
Sat, 20 Jul 2019 14:56:58 -0400 (EDT) |
branch: master
commit 8c1a2faffd4d0356cc23dccf57ccf33d55a87fce
Author: Troy Hinckley <address@hidden>
Commit: Oleh Krehel <address@hidden>
Allow all re-builders to use ivy-highlight-grep-commands
Fixes #1983
---
ivy.el | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/ivy.el b/ivy.el
index ab933f9..1d413b1 100644
--- a/ivy.el
+++ b/ivy.el
@@ -3504,15 +3504,11 @@ Note: The usual last two arguments are flipped for
convenience.")
"Highlight STR, using the default method."
(unless ivy--old-re
(setq ivy--old-re (funcall ivy--regex-function ivy-text)))
- (let ((start
- (if (and (memq (ivy-state-caller ivy-last)
ivy-highlight-grep-commands)
- (string-match "\\`[^:]+:[^:]+:" str))
- (match-end 0)
- 0))
- (regexps
+ (let ((regexps
(if (listp ivy--old-re)
(mapcar #'car (cl-remove-if-not #'cdr ivy--old-re))
- (list ivy--old-re))))
+ (list ivy--old-re)))
+ start)
(dolist (re regexps)
(ignore-errors
(while (and (string-match re str start)
@@ -3537,7 +3533,14 @@ Note: The usual last two arguments are flipped for
convenience.")
"Format line STR for use in minibuffer."
(let* ((str (ivy-cleanup-string (copy-sequence str)))
(str (if (eq ivy-display-style 'fancy)
- (funcall ivy--highlight-function str)
+ (if (memq (ivy-state-caller ivy-last)
+ ivy-highlight-grep-commands)
+ (let* ((start (if (string-match "\\`[^:]+:[^:]+:" str)
+ (match-end 0) 0))
+ (file (substring str 0 start))
+ (match (substring str start)))
+ (concat file (funcall ivy--highlight-function match)))
+ (funcall ivy--highlight-function str))
str))
(olen (length str))
(annot (plist-get completion-extra-properties :annotation-function)))
- [elpa] master 5b4dbbc 096/399: ivy.el: Silence byte-compiler, (continued)
- [elpa] master 5b4dbbc 096/399: ivy.el: Silence byte-compiler, Oleh Krehel, 2019/07/20
- [elpa] master 3954bfe 081/399: counsel.el (counsel-compile): Don't modify compilation-start-hook permanently, Oleh Krehel, 2019/07/20
- [elpa] master d92d43a 085/399: counsel.el (counsel-compile-root-functions): Tidy, Oleh Krehel, 2019/07/20
- [elpa] master 2356a1d 091/399: ivy-test.el (counsel--grep-regex): Extend test, Oleh Krehel, 2019/07/20
- [elpa] master cdd7ada 094/399: counsel.el (counsel-url-expand): Avoid null error, Oleh Krehel, 2019/07/20
- [elpa] master 089107a 099/399: counsel.el (counsel-ag): Add a keyword argument caller, Oleh Krehel, 2019/07/20
- [elpa] master 776fbb7 103/399: Make ivy-switch-buffer-occur work with multi-pass regex builders, Oleh Krehel, 2019/07/20
- [elpa] master 8b4c939 100/399: counsel.el (counsel-cd): Add, Oleh Krehel, 2019/07/20
- [elpa] master 0c8cfe8 106/399: ivy-hydra.el (ivy-dispatching-done-idle): Add, Oleh Krehel, 2019/07/20
- [elpa] master 4c52362 110/399: swiper.el (swiper-occur): Make wgrep work for narrowed buffers, Oleh Krehel, 2019/07/20
- [elpa] master 8c1a2fa 107/399: Allow all re-builders to use ivy-highlight-grep-commands,
Oleh Krehel <=
- [elpa] master 78b62f2 102/399: README.md: Mention char-fold-to-regexp, Oleh Krehel, 2019/07/20
- [elpa] master a601e40 104/399: counsel.el (counsel-org-goto-all): Use org-mode outline settings, Oleh Krehel, 2019/07/20
- [elpa] master 468e914 109/399: counsel.el (counsel--file-name-filter): Clean up style, Oleh Krehel, 2019/07/20
- [elpa] master 6373a48 105/399: counsel.el: Fix compiler warning, Oleh Krehel, 2019/07/20
- [elpa] master 164fecb 108/399: Make find-file-occur work with multi-pass regex builders, Oleh Krehel, 2019/07/20
- [elpa] master 3b677d4 113/399: counsel.el (counsel-file-jump-args): Fix dotfiles not being shown, Oleh Krehel, 2019/07/20
- [elpa] master ffa2d8f 112/399: counsel.el (counsel-unicode-char): Fix sorting, Oleh Krehel, 2019/07/20
- [elpa] master 18d7f84 117/399: counsel.el (counsel-yank-pop-action): Also works for strings, Oleh Krehel, 2019/07/20
- [elpa] master c56ad2a 114/399: ivy-hydra.el (ivy-dispatching-done-hydra): Improve, Oleh Krehel, 2019/07/20
- [elpa] master 344aebc 116/399: counsel.el (counsel-dired-jump): Improve, Oleh Krehel, 2019/07/20