branch: externals/swiper
commit 99ca1264d4a4e03cf22483c3715d343a70d72e8f
Merge: 3fb29c7 8fb081a
Author: Basil L. Contovounesios <conto...@tcd.ie>
Commit: Basil L. Contovounesios <conto...@tcd.ie>

    Merge branch 'master' into externals/swiper
---
 swiper.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/swiper.el b/swiper.el
index 39f6bfc..d57d2bc 100644
--- a/swiper.el
+++ b/swiper.el
@@ -1536,10 +1536,19 @@ When not running `swiper-isearch' already, start it."
           (setq thing (ivy-thing-at-point))))
       (swiper-isearch thing))))
 
+(defun swiper-isearch-C-r (&optional arg)
+  "Move cursor vertically up ARG candidates.
+When the input is empty, browse the search history instead."
+  (interactive "p")
+  (if (string= ivy-text "")
+      (ivy-reverse-i-search)
+    (ivy-previous-line arg)))
+
 (defvar swiper-isearch-map
   (let ((map (make-sparse-keymap)))
     (set-keymap-parent map swiper-map)
     (define-key map (kbd "M-n") 'swiper-isearch-thing-at-point)
+    (define-key map (kbd "C-r") 'swiper-isearch-C-r)
     map)
   "Keymap for `swiper-isearch'.")
 

Reply via email to