[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 2098d27 148/399: swiper.el: Set up occur for swiper-isearc
From: |
Oleh Krehel |
Subject: |
[elpa] master 2098d27 148/399: swiper.el: Set up occur for swiper-isearch |
Date: |
Sat, 20 Jul 2019 14:57:12 -0400 (EDT) |
branch: master
commit 2098d273d381dd755730b6228bb04f4b041af8a1
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
swiper.el: Set up occur for swiper-isearch
---
ivy.el | 3 ++-
swiper.el | 13 +++++++++++--
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/ivy.el b/ivy.el
index c15e7fa..2690e9d 100644
--- a/ivy.el
+++ b/ivy.el
@@ -4505,7 +4505,8 @@ EVENT gives the mouse position."
(assoc str coll)
str))))
(if (memq (ivy-state-caller ivy-last)
- '(swiper counsel-git-grep counsel-grep counsel-ag
counsel-rg))
+ '(swiper swiper-isearch
+ counsel-git-grep counsel-grep counsel-ag counsel-rg))
(with-current-buffer (window-buffer (selected-window))
(swiper--cleanup)
(swiper--add-overlays
diff --git a/swiper.el b/swiper.el
index ea10979..960010d 100644
--- a/swiper.el
+++ b/swiper.el
@@ -489,9 +489,16 @@ such as `scroll-conservatively' are set to a high value.")
(mapcar
(lambda (s)
(let* ((n (get-text-property 0 'swiper-line-number s))
- (nn (number-to-string (+ (read n) line-delta))))
+ (pt (get-text-property 0 'point s))
+ (nn (number-to-string
+ (if n
+ (progn
+ (setq s (substring s 1))
+ (+ (read n) line-delta))
+ (line-number-at-pos pt)))))
+ (put-text-property 0 1 'point pt fname)
(put-text-property 0 (length nn) 'face 'ivy-grep-line-number nn)
- (format "%s:%s:%s" fname nn (substring s 1))))
+ (format "%s:%s:%s" fname nn s)))
cands))))
(defun swiper-occur (&optional revert)
@@ -1205,6 +1212,8 @@ See `ivy-format-function' for further information."
(unless (or res (string= ivy-text ""))
(cl-pushnew ivy-text swiper-history)))))
+(ivy-set-occur 'swiper-isearch 'swiper-occur)
+
(provide 'swiper)
;;; swiper.el ends here
- [elpa] master 1df4ccf 154/399: ivy.el (ivy-occur-revert-buffer): Add swiper-isearch, (continued)
- [elpa] master 1df4ccf 154/399: ivy.el (ivy-occur-revert-buffer): Add swiper-isearch, Oleh Krehel, 2019/07/20
- [elpa] master 4f1bbc1 151/399: swiper.el (swiper-isearch-function): Full point history for DEL, Oleh Krehel, 2019/07/20
- [elpa] master 0bf94f8 156/399: ivy.el (ivy--occur-press-update-window): Add swiper-isearch, Oleh Krehel, 2019/07/20
- [elpa] master 0d2ab52 157/399: swiper.el (swiper--isearch-occur-cands): Faster version, Oleh Krehel, 2019/07/20
- [elpa] master 1bf56c3 165/399: swiper.el (swiper--query-replace-setup): Fix for ivy--regex-ignore-order, Oleh Krehel, 2019/07/20
- [elpa] master 4492054 167/399: ivy.el (ivy--recompute-index): Speed up, Oleh Krehel, 2019/07/20
- [elpa] master 11b0007 158/399: swiper.el (swiper--action): Simplify, Oleh Krehel, 2019/07/20
- [elpa] master 1ebbb5f 136/399: swiper.el (swiper-isearch): Set swiper-min-highlight to 1, Oleh Krehel, 2019/07/20
- [elpa] master b34bf45 140/399: counsel.el (counsel-dired): Add, Oleh Krehel, 2019/07/20
- [elpa] master 1e38ed4 146/399: counsel.el (counsel-minor): Add command to toggle minor mode, Oleh Krehel, 2019/07/20
- [elpa] master 2098d27 148/399: swiper.el: Set up occur for swiper-isearch,
Oleh Krehel <=
- [elpa] master dceecd8 155/399: swiper.el (swiper-occur): Adapt to swiper-isearch, Oleh Krehel, 2019/07/20
- [elpa] master f38bb51 161/399: ivy.el (ivy--prompt-selectable-p): Allow to select "", Oleh Krehel, 2019/07/20
- [elpa] master 1b13ee8 162/399: ivy.el (ivy--use-selectable-prompt): Cache ivy--prompt-selected-p, Oleh Krehel, 2019/07/20
- [elpa] master 92ec03c 163/399: ivy-test.el (ivy-use-selectable-prompt): Add tests, Oleh Krehel, 2019/07/20
- [elpa] master b2693d1 160/399: counsel.el (counsel-locate-db-path): New defcustom, Oleh Krehel, 2019/07/20
- [elpa] master 44ea8b5 166/399: counsel.el (counsel-git-grep-cmd-function): Add, Oleh Krehel, 2019/07/20
- [elpa] master 502eae6 159/399: counsel.el (counsel--call): Rename to counsel--command, Oleh Krehel, 2019/07/20
- [elpa] master 115efb7 170/399: ivy.el (ivy--sorted-files): Work around all-completions returning $$, Oleh Krehel, 2019/07/20
- [elpa] master 6c858c1 168/399: ivy.el (ivy--filter): Improve performance with :matcher, Oleh Krehel, 2019/07/20
- [elpa] master ba849e5 173/399: ivy.el (ivy--re-filter): Fix for ivy--regex-ignore-order, Oleh Krehel, 2019/07/20