Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

windows: Skip `AppendCategory` call when there are no shell links (#37926)

scuzqycdd7d4b2fb03
diff --git a/crates/gpui/src/platform/windows/destination_list.rs b/crates/gpui/src/platform/windows/destination_list.rs
index fdfa52aaecf..1bfc97d935b 100644
--- a/crates/gpui/src/platform/windows/destination_list.rs
+++ b/crates/gpui/src/platform/windows/destination_list.rs
@@ -171,7 +171,9 @@ fn add_recent_folders(
)?)?;
}
- list.AppendCategory(&HSTRING::from("Recent Folders"), &tasks)?;
+ if tasks.GetCount().unwrap_or(0) > 0 {
+ list.AppendCategory(&HSTRING::from("Recent Folders"), &tasks)?;
+ }
Ok(())
}
}