branch: elpa/isl
commit 018ba71ecda25d52926023016cfaf9d715178a74
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>
Flash mode-line when changing style only when pattern is empty
---
isearch-light.el | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/isearch-light.el b/isearch-light.el
index dda79f67134..947d8e6bfc6 100644
--- a/isearch-light.el
+++ b/isearch-light.el
@@ -163,12 +163,13 @@
(if (eq isl-search-function 're-search-forward)
#'search-forward
#'re-search-forward))
- (let* ((style (cl-case isl-search-function
- (re-search-forward "Regex")
- (search-forward "Literal")))
- (mode-line-format (format " Switching to %s searching" style)))
- (force-mode-line-update)
- (sit-for 1))
+ (when (string= isl-pattern "")
+ (let* ((style (cl-case isl-search-function
+ (re-search-forward "Regex")
+ (search-forward "Literal")))
+ (mode-line-format (format " Switching to %s searching" style)))
+ (force-mode-line-update)
+ (sit-for 1)))
(isl--setup-mode-line)))