Propertize the search term for org-roam-search

This commit is contained in:
Chris Barrett
2022-09-24 19:12:17 +12:00
parent ce9e35f9cf
commit eff488b85e

View File

@@ -81,6 +81,13 @@ would be excluded."
"Face for highlighted results in the search buffer."
:group 'org-roam-search)
(defface org-roam-search-query
'((t
(:inherit font-lock-string-face)))
"Face for the search query in the header line."
:group 'org-roam-search)
(defun org-roam-search--highlight-matches (regexp)
@@ -198,7 +205,7 @@ QUERY is a PRCE regexp string that will be passed to ripgrep."
(let ((nodes (org-roam-search--ripgrep-for-nodes query)))
(org-roam-review-display-buffer-and-select
(org-roam-review-create-buffer
:title (format "Search Results: %s" query)
:title (concat "Search Results: " (propertize query 'face 'org-roam-search-query))
:placeholder "No search results"
:buffer-name org-roam-search-buffer-name
:nodes