[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 9407b21 021/348: swiper.el (swiper-action-recenter): New d
From: |
Oleh Krehel |
Subject: |
[elpa] master 9407b21 021/348: swiper.el (swiper-action-recenter): New defcustom |
Date: |
Sat, 8 Apr 2017 11:03:16 -0400 (EDT) |
branch: master
commit 9407b21b428e65c19b28c16748c8ff777ba89841
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
swiper.el (swiper-action-recenter): New defcustom
* swiper.el (swiper--action): Recenter accordingly.
Re #116
---
swiper.el | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/swiper.el b/swiper.el
index ef1381b..50aac67 100644
--- a/swiper.el
+++ b/swiper.el
@@ -580,6 +580,10 @@ WND, when specified is the window."
(overlay-put overlay 'priority i)))
(cl-incf i)))))))))
+(defcustom swiper-action-recenter nil
+ "When non-nil, recenter after exiting `swiper'."
+ :type 'boolean)
+
(defun swiper--action (x)
"Goto line X."
(let ((ln (1- (read (or (get-text-property 0 'display x)
@@ -599,6 +603,8 @@ WND, when specified is the window."
ln)
(re-search-forward re (line-end-position) t)
(swiper--ensure-visible)
+ (when swiper-action-recenter
+ (recenter))
(when (/= (point) swiper--opoint)
(unless (and transient-mark-mode mark-active)
(when (eq ivy-exit 'done)
- [elpa] master updated (4bfb692 -> e1351c8), Oleh Krehel, 2017/04/08
- [elpa] master f90ae3f 002/348: doc/ivy.org: Bump version, Oleh Krehel, 2017/04/08
- [elpa] master c875668 010/348: counsel.el (counsel-mode-map): Add counsel-info-lookup-symbol, Oleh Krehel, 2017/04/08
- [elpa] master b7b4758 007/348: ivy.el: Autoload ivy-read, Oleh Krehel, 2017/04/08
- [elpa] master 4a24514 001/348: doc/Changelog.org: Improve for export to HTML, Oleh Krehel, 2017/04/08
- [elpa] master 778c615 013/348: ivy.el (ivy-add-actions): New function, Oleh Krehel, 2017/04/08
- [elpa] master fd4fd36 011/348: ivy-hydra.el: Fix hydra self-install, Oleh Krehel, 2017/04/08
- [elpa] master ff415c0 012/348: fixed typos, Oleh Krehel, 2017/04/08
- [elpa] master 23d7c74 015/348: Fix previous commit, Oleh Krehel, 2017/04/08
- [elpa] master 6c669ff 014/348: File sorting function using a priority order for extensions, Oleh Krehel, 2017/04/08
- [elpa] master 9407b21 021/348: swiper.el (swiper-action-recenter): New defcustom,
Oleh Krehel <=
- [elpa] master f3690b6 019/348: Make "M-o j" consistent for ivy-switch-buffer and counsel-find-file, Oleh Krehel, 2017/04/08
- [elpa] master 79ffa67 009/348: ivy.el (ivy--filter): Recompute index after sort, Oleh Krehel, 2017/04/08
- [elpa] master c2646d4 020/348: counsel.el (counsel-load-theme-action): Update, Oleh Krehel, 2017/04/08
- [elpa] master aadc062 024/348: ivy-test.el: Add a provide statement, Oleh Krehel, 2017/04/08
- [elpa] master eba0d9e 008/348: swiper.el (swiper--ivy): Remove interactive, Oleh Krehel, 2017/04/08
- [elpa] master c20867b 022/348: ivy-hydra.el: Add package tags, Oleh Krehel, 2017/04/08
- [elpa] master 37a9629 018/348: ivy.el (ivy--reset-state): Fix ivy-resume for files, Oleh Krehel, 2017/04/08
- [elpa] master c4775b6 031/348: ivy.el (ivy-action-wrap): New defcustom, Oleh Krehel, 2017/04/08
- [elpa] master ac1dc5b 034/348: counsel.el (counsel-company): New command, Oleh Krehel, 2017/04/08
- [elpa] master cba67e4 038/348: counsel.el (counsel-bookmark): Add require, Oleh Krehel, 2017/04/08