]> code.delx.au - gnu-emacs-elpa/commitdiff
Work around magit highlighting problem
authorOleh Krehel <ohwoeowho@gmail.com>
Tue, 17 Mar 2015 22:03:34 +0000 (23:03 +0100)
committerOleh Krehel <ohwoeowho@gmail.com>
Tue, 17 Mar 2015 22:03:34 +0000 (23:03 +0100)
* swiper.el (swiper-font-lock-ensure): Update.

Re #19

swiper.el

index 23d840600b373201e4e756bae0cd0fc7018865dd..a34b39325503b20b3e3ce33c98feb762a05f61c9 100644 (file)
--- a/swiper.el
+++ b/swiper.el
 (defvar swiper--window nil
   "Store the current window.")
 
-(defalias 'swiper-font-lock-ensure
+(defun swiper-font-lock-ensure ()
+  "Ensure the entired buffer is highlighted."
+  (unless (derived-mode-p 'magit-mode)
     (if (fboundp 'font-lock-ensure)
-        'font-lock-ensure
-      'font-lock-fontify-buffer))
+        (font-lock-ensure)
+      (font-lock-fontify-buffer))))
 
 (defun swiper--candidates ()
   "Return a list of this buffer lines."
@@ -362,7 +364,7 @@ When non-nil, INITIAL-INPUT is the initial search pattern."
   (swiper--action x helm-input))
 
 (defun swiper--action (x input)
-  "Goto line X and search for input."
+  "Goto line X and search for INPUT."
   (if (null x)
       (user-error "No candidates")
     (goto-char (point-min))