branch: master
commit 3773c26729d2fecfd7706e3b0ce13198776ac3ac
Author: Oleh Krehel <ohwoeo...@gmail.com>
Commit: Oleh Krehel <ohwoeo...@gmail.com>

    swiper.el (swiper--current-window-start): Add docstring
    
    Re #643
---
 swiper.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/swiper.el b/swiper.el
index 99efef7..3ec8104 100644
--- a/swiper.el
+++ b/swiper.el
@@ -417,7 +417,10 @@ When non-nil, INITIAL-INPUT is the initial search pattern."
   (interactive)
   (swiper--ivy (swiper--candidates) initial-input))
 
-(defvar swiper--current-window-start nil)
+(defvar swiper--current-window-start nil
+  "Store `window-start' to restore it later.
+This prevents a \"jumping\" behavior which occurs when variables
+such as `scroll-conservatively' are set to a high value.")
 
 (defun swiper--extract-matches (regex cands)
   "Extract captured REGEX groups from CANDS."

Reply via email to