Skip to content

Commit 704ff6a

Browse files
committed
Unhighlight all items when config changes, fixes #1139
1 parent e2c446b commit 704ff6a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/tab.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,7 +1586,6 @@ pub enum Message {
15861586
SetSort(HeadingOptions, bool),
15871587
TabComplete(PathBuf, Vec<(String, PathBuf)>),
15881588
Thumbnail(PathBuf, ItemThumbnail),
1589-
View(View),
15901589
ToggleSort(HeadingOptions),
15911590
Drop(Option<(Location, ClipboardPaste)>),
15921591
DndHover(Location),
@@ -3124,6 +3123,12 @@ impl Tab {
31243123
));
31253124
}
31263125
}
3126+
// Unhighlight all items when config changes
3127+
if let Some(ref mut items) = self.items_opt {
3128+
for item in items.iter_mut() {
3129+
item.highlighted = false;
3130+
}
3131+
}
31273132
}
31283133
Message::ContextAction(action) => {
31293134
// Close context menu
@@ -3810,9 +3815,6 @@ impl Tab {
38103815
}
38113816
}
38123817
}
3813-
Message::View(view) => {
3814-
self.config.view = view;
3815-
}
38163818
Message::ToggleSort(heading_option) => {
38173819
if !matches!(self.location, Location::Search(..)) {
38183820
let heading_sort = if self.sort_name == heading_option {

0 commit comments

Comments
 (0)