branch: master commit de8084629e3ba51d638944015aa743e6ab46bace Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
Work around magit highlighting problem * swiper.el (swiper-font-lock-ensure): Update. Re #19 --- swiper.el | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/swiper.el b/swiper.el index 23d8406..a34b393 100644 --- a/swiper.el +++ b/swiper.el @@ -77,10 +77,12 @@ (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))