emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master bb6c40c 63/67: swiper.el (swiper-min-highlight): New defcu


From: Oleh Krehel
Subject: [elpa] master bb6c40c 63/67: swiper.el (swiper-min-highlight): New defcustom
Date: Sun, 22 Mar 2015 17:34:12 +0000

branch: master
commit bb6c40c895f93a1239560f831d6986c0712c328a
Author: John Mastro <address@hidden>
Commit: Oleh Krehel <address@hidden>

    swiper.el (swiper-min-highlight): New defcustom
    
    (swiper--add-overlays): Use `swiper-min-highlight'
---
 swiper.el |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/swiper.el b/swiper.el
index 825a088..b6edc36 100644
--- a/swiper.el
+++ b/swiper.el
@@ -68,6 +68,10 @@
                           swiper-match-face-4)
   "List of `swiper' faces for group matches.")
 
+(defcustom swiper-min-highlight 2
+  "Only highlight matches for regexps at least this long."
+  :type 'integer)
+
 (defvar swiper--window nil
   "Store the current window.")
 
@@ -207,7 +211,7 @@ When non-nil, INITIAL-INPUT is the initial search pattern."
 
 (defun swiper--add-overlays (re beg end)
   "Add overlays for RE regexp in current buffer between BEG and END."
-  (when (> (length re) 1)
+  (when (>= (length re) swiper-min-highlight)
     (save-excursion
       (goto-char beg)
       ;; RE can become an invalid regexp



reply via email to

[Prev in Thread] Current Thread [Next in Thread]