From d4a65ac4eda41ecee063e111d67ad1346de234b2 Mon Sep 17 00:00:00 2001 From: lukeflo Date: Mon, 21 Oct 2024 13:01:38 +0200 Subject: show order if list is filtered by multiple keywords successively --- src/frontend/ui.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/frontend/ui.rs') diff --git a/src/frontend/ui.rs b/src/frontend/ui.rs index 59a07f3..6fab1d1 100644 --- a/src/frontend/ui.rs +++ b/src/frontend/ui.rs @@ -188,8 +188,8 @@ impl App { }); let [file_area, keyword_area, count_area] = Layout::horizontal([ + Constraint::Fill(3), Constraint::Fill(4), - Constraint::Fill(2), Constraint::Fill(1), ]) .horizontal_margin(1) @@ -202,10 +202,12 @@ impl App { .bg(HEADER_FOOTER_BG) .render(file_area, buf); - Line::from(if !self.tag_list.selected_keyword.is_empty() { + Line::from(if !self.tag_list.selected_keywords.is_empty() { vec![ - Span::raw("Filtered by: "), - Span::raw(self.tag_list.selected_keyword.to_string()) + Span::raw("Selected keywords: "), + // Show all keywords in correct order if list is filtered + // successively by multiple keywords + Span::raw(self.tag_list.selected_keywords.join(" → ")) .bold() .green(), ] -- cgit v1.2.3