[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master fc5c8fc 159/348: Fix ivy-occur-press for swiper
From: |
Oleh Krehel |
Subject: |
[elpa] master fc5c8fc 159/348: Fix ivy-occur-press for swiper |
Date: |
Sat, 8 Apr 2017 11:03:47 -0400 (EDT) |
branch: master
commit fc5c8fc76376ac5ac1398ee72eb378984d922504
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Fix ivy-occur-press for swiper
* swiper.el (swiper-occur): Set `swiper--current-window-start' to nil.
(swiper--action): Do nothing extra for null `swiper--current-window-start'.
---
swiper.el | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/swiper.el b/swiper.el
index d941f73..d43244b 100644
--- a/swiper.el
+++ b/swiper.el
@@ -358,6 +358,7 @@ When non-nil, INITIAL-INPUT is the initial search pattern."
(swiper--ivy (swiper--candidates) initial-input))
(declare-function string-trim-right "subr-x")
+(defvar swiper--current-window-start nil)
(defun swiper-occur (&optional revert)
"Generate a custom occur buffer for `swiper'.
@@ -393,6 +394,7 @@ When REVERT is non-nil, regenerate the current *ivy-occur*
buffer."
(unless (eq major-mode 'ivy-occur-grep-mode)
(ivy-occur-grep-mode)
(font-lock-mode -1))
+ (setq swiper--current-window-start nil)
(insert (format "-*- mode:grep; default-directory: %S -*-\n\n\n"
default-directory))
(insert (format "%d candidates:\n" (length cands)))
@@ -409,7 +411,6 @@ When REVERT is non-nil, regenerate the current *ivy-occur*
buffer."
(defvar swiper--current-line nil)
(defvar swiper--current-match-start nil)
-(defvar swiper--current-window-start nil)
(defun swiper--init ()
"Perform initialization common to both completion methods."
@@ -654,9 +655,10 @@ WND, when specified is the window."
ln)
(re-search-forward re (line-end-position) t)
(swiper--ensure-visible)
- (if swiper-action-recenter
- (recenter)
- (set-window-start (selected-window) swiper--current-window-start))
+ (cond (swiper-action-recenter
+ (recenter))
+ (swiper--current-window-start
+ (set-window-start (selected-window)
swiper--current-window-start)))
(when (/= (point) swiper--opoint)
(unless (and transient-mark-mode mark-active)
(when (eq ivy-exit 'done)
- [elpa] master 8632f33 175/348: counsel.el: Update description comment., (continued)
- [elpa] master 8632f33 175/348: counsel.el: Update description comment., Oleh Krehel, 2017/04/08
- [elpa] master 89a6830 186/348: counsel.el (counsel-at-git-issue-p): Fix for newer magit, Oleh Krehel, 2017/04/08
- [elpa] master 3d0e4a5 184/348: counsel.el (counsel-locate-action-extern): Update on w32, Oleh Krehel, 2017/04/08
- [elpa] master db9d7b8 188/348: Fix counsel-grep for files with spaces in the name, Oleh Krehel, 2017/04/08
- [elpa] master e7d6dab 185/348: counsel.el (counsel-mode): Add "C-r" bindings, Oleh Krehel, 2017/04/08
- [elpa] master f180451 179/348: swiper.el (swiper-all): Fix window-width in -nw, Oleh Krehel, 2017/04/08
- [elpa] master e11c926 182/348: Allow to "C-y" a "/ssh:" file name, Oleh Krehel, 2017/04/08
- [elpa] master 4e6921f 153/348: ivy.el: Apply alist change to ivy-occur, Oleh Krehel, 2017/04/08
- [elpa] master 36b00cb 155/348: Use EVM in travis to test across multiple Emacs versions, Oleh Krehel, 2017/04/08
- [elpa] master f6bd64b 164/348: ivy.el (ivy--flx-featurep): New defvar, Oleh Krehel, 2017/04/08
- [elpa] master fc5c8fc 159/348: Fix ivy-occur-press for swiper,
Oleh Krehel <=
- [elpa] master e98883f 162/348: Improve fuzzy swiper highlight, Oleh Krehel, 2017/04/08
- [elpa] master 9b28927 187/348: counsel.el (counsel-hydra-heads): Fixup, Oleh Krehel, 2017/04/08
- [elpa] master 00219da 181/348: Fix for older Emacs, Oleh Krehel, 2017/04/08
- [elpa] master 8f87f74 178/348: counsel.el (counsel-git-grep): Update for Windows, Oleh Krehel, 2017/04/08
- [elpa] master 79105a5 208/348: counsel.el (counsel-info-lookup-symbol): Add preselect, Oleh Krehel, 2017/04/08
- [elpa] master 222a5e6 217/348: ivy.el (ivy--virtual-buffers): Move to silence compiler, Oleh Krehel, 2017/04/08
- [elpa] master 35b5d29 230/348: New example to show how to associate values, Oleh Krehel, 2017/04/08
- [elpa] master e9c274a 236/348: Allow to customize ivy-display-function per caller, Oleh Krehel, 2017/04/08
- [elpa] master c14ceac 245/348: Add support for counsel-find-library, Oleh Krehel, 2017/04/08
- [elpa] master ca84f24 269/348: Add highlighter function configuration to ivy, Oleh Krehel, 2017/04/08