From 3cf4ff82a65e328fa80c561d594df6632572c698 Mon Sep 17 00:00:00 2001 From: Frank Hamand Date: Mon, 4 Aug 2025 17:07:25 +0200 Subject: feat: highlight matches in interactive search (#2653) * feat: highlight matches in interactive search uses `norm` to do fzf-compatible matches when rendering history items in the search panel to highlight the matching ranges of the item this helps see _why_ certain history items have come up note that this will never be 100% perfect as we search on a sqlite query but it should be good enough in most cases * fmt * fix some clippy issues * refactor to pass in a history_highlighter instead of search and engine * improve the highlighting on the selected row --------- Co-authored-by: Ellie Huxtable --- Cargo.lock | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Cargo.lock') diff --git a/Cargo.lock b/Cargo.lock index 414f1f1a..46b43de3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -249,6 +249,7 @@ dependencies = [ "interim", "itertools 0.13.0", "log", + "norm", "ratatui", "regex", "rpassword", @@ -2656,6 +2657,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "norm" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5725a3379c44dc0adf3437af87cf21c10df473ed858d654b12603dea102508" +dependencies = [ + "memchr", +] + [[package]] name = "ntapi" version = "0.4.1" -- cgit v1.3.1