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

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

[elpa] externals/marginalia db18b0e 152/241: Add support for hidden cons


From: Stefan Monnier
Subject: [elpa] externals/marginalia db18b0e 152/241: Add support for hidden consult buffers
Date: Fri, 28 May 2021 20:49:17 -0400 (EDT)

branch: externals/marginalia
commit db18b0ef41b034379899b1932abfc6b7bbfee41e
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Add support for hidden consult buffers
    
    See 
https://github.com/minad/consult/commit/0bc125f26f5f46fcf39d139722b9b762a1b6f012
    
    cc @oantolin, maybe the embark virtual buffer keymap needs an update too
---
 marginalia.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/marginalia.el b/marginalia.el
index 46700da..2c6d7df 100644
--- a/marginalia.el
+++ b/marginalia.el
@@ -321,6 +321,7 @@ This hash table is needed to speed up 
`marginalia-annotate-binding'.")
   (marginalia--fields
    ((pcase (- (elt cand 0) #x100000)
       (?b "Buffer")
+      (?h "Hidden Buffer")
       (?f "File")
       (?p "Project Buffer")
       (?q "Project File")
@@ -332,7 +333,7 @@ This hash table is needed to speed up 
`marginalia-annotate-binding'.")
 (defun marginalia-annotate-virtual-buffer-full (cand)
   "Annotate virtual-buffer CAND with the buffer class."
   (pcase (- (elt cand 0) #x100000)
-    ((or ?b ?p) (marginalia-annotate-buffer (substring cand 1)))
+    ((or ?b ?h ?p) (marginalia-annotate-buffer (substring cand 1)))
     ((or ?f ?q) (marginalia-annotate-file (substring cand 1)))
     (_ (marginalia-annotate-virtual-buffer-class cand))))
 
@@ -522,7 +523,8 @@ Similar to `marginalia-annotate-symbol', but does not show 
symbol class."
                           marginalia--separator
                           (7 (:propertize "%I" face marginalia-size))
                           marginalia--separator
-                          (16 (:propertize mode-name face marginalia-mode)))
+                          ;; InactiveMinibuffer has 18 letters
+                          (18 (:propertize mode-name face marginalia-mode)))
                         nil nil buffer))
      ((if-let (proc (get-buffer-process buffer))
           (format "(%s %s) %s"



reply via email to

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