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

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

[nongnu] elpa/anzu 799f26ee0e 260/288: Merge pull request #86 from syohe


From: ELPA Syncer
Subject: [nongnu] elpa/anzu 799f26ee0e 260/288: Merge pull request #86 from syohex/no-match-face
Date: Thu, 6 Jan 2022 03:58:59 -0500 (EST)

branch: elpa/anzu
commit 799f26ee0e3ce598b36983f4dce539f47739e656
Merge: d257c79a7a ed5e91b0c4
Author: Syohei YOSHIDA <syohex@gmail.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #86 from syohex/no-match-face
    
    Add face at no-match case
---
 anzu.el | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/anzu.el b/anzu.el
index a8ac706df3..9ab18f9092 100644
--- a/anzu.el
+++ b/anzu.el
@@ -100,6 +100,10 @@
   '((t (:foreground "magenta" :weight bold)))
   "face of anzu modeline")
 
+(defface anzu-mode-line-no-match
+  '((t (:inherit anzu-mode-line)))
+  "face of anzu modeline in no match case")
+
 (defface anzu-replace-highlight
   '((t :inherit query-replace))
   "highlight of replaced string")
@@ -284,8 +288,11 @@
                                     (anzu--format-here-position here total)
                                     total (if anzu--overflow-p "+" "")))
                     (replace-query (format "(%d replace)" total))
-                    (replace (format "(%d/%d)" here total)))))
-      (propertize status 'face 'anzu-mode-line))))
+                    (replace (format "(%d/%d)" here total))))
+          (face (if (and (zerop total) (not (string= isearch-string "")))
+                    'anzu-mode-line-no-match
+                  'anzu-mode-line)))
+      (propertize status 'face face))))
 
 (defun anzu--update-mode-line ()
   (funcall anzu-mode-line-update-function anzu--current-position 
anzu--total-matched))



reply via email to

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