]> code.delx.au - gnu-emacs-elpa/commitdiff
swiper.el (swiper--candidates): Avoid line-move for large buffers
authorOleh Krehel <ohwoeowho@gmail.com>
Sun, 4 Oct 2015 16:56:05 +0000 (18:56 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Sun, 4 Oct 2015 16:57:47 +0000 (18:57 +0200)
Re #227

swiper.el

index 09c266ebf8de0934d72500677caa4861fe970cf7..0f8ff31d2262fe257849242ace812deadb1a975d 100644 (file)
--- a/swiper.el
+++ b/swiper.el
       (setq swiper--format-spec
             (format "%%-%dd " swiper--width))
       (let ((line-number 0)
-            (advancer (if visual-line-mode
+            (advancer (if (and visual-line-mode
+                               (< (buffer-size) 20000))
                           (lambda (arg) (line-move arg t))
                         #'forward-line))
             candidates)