Unhighlight all items when config changes, fixes #1139

This commit is contained in:
Jeremy Soller 2025-10-20 14:16:03 -06:00
parent e2c446b73a
commit 704ff6ad4f
No known key found for this signature in database
GPG key ID: 670FDFB5428E05CA

View file

@ -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 {