Unhighlight all items when config changes, fixes #1139
This commit is contained in:
parent
e2c446b73a
commit
704ff6ad4f
1 changed files with 6 additions and 4 deletions
10
src/tab.rs
10
src/tab.rs
|
|
@ -1586,7 +1586,6 @@ pub enum Message {
|
||||||
SetSort(HeadingOptions, bool),
|
SetSort(HeadingOptions, bool),
|
||||||
TabComplete(PathBuf, Vec<(String, PathBuf)>),
|
TabComplete(PathBuf, Vec<(String, PathBuf)>),
|
||||||
Thumbnail(PathBuf, ItemThumbnail),
|
Thumbnail(PathBuf, ItemThumbnail),
|
||||||
View(View),
|
|
||||||
ToggleSort(HeadingOptions),
|
ToggleSort(HeadingOptions),
|
||||||
Drop(Option<(Location, ClipboardPaste)>),
|
Drop(Option<(Location, ClipboardPaste)>),
|
||||||
DndHover(Location),
|
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) => {
|
Message::ContextAction(action) => {
|
||||||
// Close context menu
|
// Close context menu
|
||||||
|
|
@ -3810,9 +3815,6 @@ impl Tab {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Message::View(view) => {
|
|
||||||
self.config.view = view;
|
|
||||||
}
|
|
||||||
Message::ToggleSort(heading_option) => {
|
Message::ToggleSort(heading_option) => {
|
||||||
if !matches!(self.location, Location::Search(..)) {
|
if !matches!(self.location, Location::Search(..)) {
|
||||||
let heading_sort = if self.sort_name == heading_option {
|
let heading_sort = if self.sort_name == heading_option {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue