From 704ff6ad4fa3bbc3634425165ddec8893d7bad8b Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 20 Oct 2025 14:16:03 -0600 Subject: [PATCH] Unhighlight all items when config changes, fixes #1139 --- src/tab.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/tab.rs b/src/tab.rs index 7180f93..f6c0e07 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -1586,7 +1586,6 @@ pub enum Message { SetSort(HeadingOptions, bool), TabComplete(PathBuf, Vec<(String, PathBuf)>), Thumbnail(PathBuf, ItemThumbnail), - View(View), ToggleSort(HeadingOptions), Drop(Option<(Location, ClipboardPaste)>), DndHover(Location), @@ -3124,6 +3123,12 @@ impl Tab { )); } } + // Unhighlight all items when config changes + if let Some(ref mut items) = self.items_opt { + for item in items.iter_mut() { + item.highlighted = false; + } + } } Message::ContextAction(action) => { // Close context menu @@ -3810,9 +3815,6 @@ impl Tab { } } } - Message::View(view) => { - self.config.view = view; - } Message::ToggleSort(heading_option) => { if !matches!(self.location, Location::Search(..)) { let heading_sort = if self.sort_name == heading_option {