]> code.delx.au - gnu-emacs-elpa/commitdiff
swiper.el (swiper-font-lock-ensure): Don't fail when font-lock is off
authorOleh Krehel <ohwoeowho@gmail.com>
Thu, 25 Feb 2016 07:56:48 +0000 (08:56 +0100)
committerOleh Krehel <ohwoeowho@gmail.com>
Thu, 25 Feb 2016 07:56:48 +0000 (08:56 +0100)
Fixes #400

swiper.el

index 2d46f08d2b2ddf01968cbfd263295f8c8c90e499..35d9119162b7c83cf26767362d4d3d210746f855 100644 (file)
--- a/swiper.el
+++ b/swiper.el
 (defun swiper-font-lock-ensure ()
   "Ensure the entired buffer is highlighted."
   (unless (swiper-font-lock-ensure-p)
-    (unless (> (buffer-size) 100000)
+    (unless (or (> (buffer-size) 100000) (null font-lock-mode))
       (if (fboundp 'font-lock-ensure)
           (font-lock-ensure)
         (with-no-warnings (font-lock-fontify-buffer))))))