[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra 1020a77 026/395: swiper.el (swiper-query-repl
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra 1020a77 026/395: swiper.el (swiper-query-replace): Show matched groups in preview |
Date: |
Thu, 25 Feb 2021 08:31:23 -0500 (EST) |
branch: externals/ivy-hydra
commit 1020a777c59c6e0208b19940d94e12faba06a280
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
swiper.el (swiper-query-replace): Show matched groups in preview
Only works when there are no spaces in the search string.
Fixes #2289
---
swiper.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/swiper.el b/swiper.el
index 19d1073..3ef52dc 100644
--- a/swiper.el
+++ b/swiper.el
@@ -158,7 +158,11 @@ Treated as non-nil when searching backwards."
(propertize
(if (stringp lisp)
lisp
- ivy-text)
+ (set-match-data (overlay-get ov 'md))
+ (condition-case nil
+ (with-current-buffer (nth 4 (overlay-get ov 'md))
+ (match-substitute-replacement ivy-text))
+ (error ivy-text)))
'face 'error)))))
(defun swiper--query-replace-cleanup ()
@@ -174,13 +178,14 @@ Treated as non-nil when searching backwards."
(while (and (re-search-forward re end t)
(not (eobp)))
(let ((ov (make-overlay (1- (match-end 0)) (match-end 0)))
- (md (match-data)))
+ (md (match-data t)))
(overlay-put
ov 'matches
(mapcar
(lambda (x)
(list `(match-string ,x) (match-string x)))
(number-sequence 0 (1- (/ (length md) 2)))))
+ (overlay-put ov 'md md)
(push ov swiper--query-replace-overlays))
(unless (> (match-end 0) (match-beginning 0))
(forward-char)))))))
- [elpa] externals/ivy-hydra e7eca37 085/395: counsel.el (counsel-switch-buffer-preview-virtual-buffers): Add, (continued)
- [elpa] externals/ivy-hydra e7eca37 085/395: counsel.el (counsel-switch-buffer-preview-virtual-buffers): Add, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra eae1ccf 086/395: ivy.el (ivy-auto-shrink-minibuffer): New defcustom, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra f16e6e2 094/395: counsel.el (counsel-flycheck-errors-cands): Show the error, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 400a900 265/395: ivy.el (ivy-backward-delete-char): Forward to counsel-up-directory, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra edccbd7 270/395: ivy.el (ivy-completion-in-region): Use collection in place of all-completions, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 0f4cb44 051/395: ivy.el (ivy-add-prompt-count): Account for :dynamic-collection returning 0, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra cab01f3 053/395: ivy.el (ivy--reset-state): Add listp check, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra abfb283 054/395: ivy-overlay.el (ivy-display-function-overlay): Fix for org-current-level, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 06886f1 055/395: ivy.el (ivy--tramp-prefix-p): Extract, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra d2052ba 017/395: counsel.el (counsel--company-display-transformer): Add, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1020a77 026/395: swiper.el (swiper-query-replace): Show matched groups in preview,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra c0b61ea 028/395: swiper.el (swiper--query-replace-setup): Highlight at eobp, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 412266f 038/395: swiper.el (swiper--line-at-point): Don't error on empty string, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra e598b04 042/395: ivy.el (ivy--regex): Improve handling of capture groups, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra f42723e 046/395: ivy.el (ivy-done): Let it go through the rest of conditions if confirmation is not required., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 6abc3de 050/395: .travis.yml: Use 2 xenial recipes, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ecb098d 049/395: counsel.el (counsel-imenu): Add counsel-imenu-history., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 657e6b4 062/395: ivy-test.el (ivy-inhibit-action): Better behavior with an alist collection, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 4ba0944 064/395: counsel.el (counsel-set-variable): Save expr to the kill ring, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 40978ec 063/395: counsel.el (counsel-ag-base-command): Set default to --vimgrep, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra e7146dc 066/395: counsel.el (counsel--compilation-errors-buffer): Simplify, Basil L. Contovounesios, 2021/02/25