[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra 8386220 173/395: swiper.el (swiper-isearch):
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra 8386220 173/395: swiper.el (swiper-isearch): Save mark |
Date: |
Thu, 25 Feb 2021 08:31:56 -0500 (EST) |
branch: externals/ivy-hydra
commit 83862200e9973430ca176e96eaa7c44a45ecfe0c
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
swiper.el (swiper-isearch): Save mark
* swiper.el (swiper--push-mark): Extract.
Fixes #2341
---
swiper.el | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/swiper.el b/swiper.el
index bfc0e58..c3ca8f8 100644
--- a/swiper.el
+++ b/swiper.el
@@ -1098,6 +1098,13 @@ WND, when specified is the window."
(or (get-text-property 0 'swiper-line-number x)
(get-text-property 1 'swiper-line-number x)))
+(defun swiper--push-mark ()
+ (when (/= (point) swiper--opoint)
+ (unless (and transient-mark-mode mark-active)
+ (when (eq ivy-exit 'done)
+ (push-mark swiper--opoint t)
+ (message "Mark saved where search started")))))
+
(defun swiper--action (x)
"Goto line X."
(let ((ln (1- (swiper--line-number x)))
@@ -1121,11 +1128,7 @@ WND, when specified is the window."
(goto-char (match-beginning 0)))
(swiper--ensure-visible)
(swiper--maybe-recenter)
- (when (/= (point) swiper--opoint)
- (unless (and transient-mark-mode mark-active)
- (when (eq ivy-exit 'done)
- (push-mark swiper--opoint t)
- (message "Mark saved where search started"))))
+ (swiper--push-mark)
(swiper--remember-search-history re)))))
(defun swiper--remember-search-history (re)
@@ -1493,7 +1496,9 @@ that we search only for one character."
(isearch-range-invisible (point) (1+ (point)))
(swiper--maybe-recenter)
(if (eq ivy-exit 'done)
- (swiper--remember-search-history (ivy--regex ivy-text))
+ (progn
+ (swiper--push-mark)
+ (swiper--remember-search-history (ivy--regex ivy-text)))
(swiper--cleanup)
(swiper--delayed-add-overlays)
(swiper--add-cursor-overlay
- [elpa] externals/ivy-hydra e32f14d 067/395: targets/plain.el (ivy-use-virtual-buffers): Enable, (continued)
- [elpa] externals/ivy-hydra e32f14d 067/395: targets/plain.el (ivy-use-virtual-buffers): Enable, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 529cc08 071/395: ivy-test.el (ivy-swiper-wgrep): Disable on 24.5, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1b3d0a3 072/395: ivy.el (ivy--split): Fix for "\\" input, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra e2f1fe1 068/395: swiper.el (swiper--query-replace-updatefn): Fix bug, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 4fbd5a9 081/395: ivy-test.el (ivy-completing-read): Add test, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 83f04c0 092/395: counsel.el (counsel-flycheck): Add, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 99c02cc 109/395: ivy.el (ivy-partial): Fix ivy-regex mistaken for ivy-text, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 93d925d 121/395: counsel.el (counsel-mark--get-candidates): Extract, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 3119994 144/395: ivy.el (ivy--tramp-prefix-p): Fix regression, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 82331ed 147/395: Revert "Don't hardcode C-s and C-r", Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 8386220 173/395: swiper.el (swiper-isearch): Save mark,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra c84bc31 164/395: ivy.el (ivy--magic-file-slash): Use "///" instead of "//" on Windows, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 7c0f16d 155/395: swiper.el (swiper--re-builder): Genaralize search-default-mode, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 40a7731 199/395: ivy.el (ivy-switch-buffer-transformer): Change how remote dirs are displayed, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 5f430f4 198/395: ivy.el (ivy-switch-buffer-transformer): Fix for virtual buffers, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 9e0803c 226/395: ivy.el (ivy--remote-name): Extract and use the file name, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 7ed3d85 223/395: Move recent varalias before its referent, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 136ae0e 194/395: Add command for play/pause current song, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra a0063ce 224/395: ivy.el (ivy--done): Revert ivy-set-text, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 5c951e2 245/395: * counsel.el: Add comment on xor compatibility, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1396d7b 024/395: counsel.el (counsel-grep): Obey ivy-case-fold-search-default, Basil L. Contovounesios, 2021/02/25