branch: master commit 481908c47b56b4b2785664be9cbc9a63dd339261 Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
Don't try to fontify huge buffers * swiper.el (swiper-font-lock-ensure): Update. --- swiper.el | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/swiper.el b/swiper.el index 1a50895..8f0a083 100644 --- a/swiper.el +++ b/swiper.el @@ -113,9 +113,10 @@ gnus-group-mode emms-playlist-mode erc-mode org-agenda-mode))) - (if (fboundp 'font-lock-ensure) - (font-lock-ensure) - (font-lock-fontify-buffer)))) + (unless (> (buffer-size) 100000) + (if (fboundp 'font-lock-ensure) + (font-lock-ensure) + (font-lock-fontify-buffer))))) (defvar swiper--format-spec "" "Store the current candidates format spec.")