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.

Fix cargo test -p editor for Linux/Wayland (#49730)

Jakub Konka9fdfc4268960
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs
index 62fa1506b45..44e1b4be715 100644
--- a/crates/editor/src/editor.rs
+++ b/crates/editor/src/editor.rs
@@ -6334,7 +6334,7 @@ impl Editor {
self.completion_tasks.push((id, task));
}
- #[cfg(feature = "test-support")]
+ #[cfg(any(test, feature = "test-support"))]
pub fn current_completions(&self) -> Option<Vec<project::Completion>> {
let menu = self.context_menu.borrow();
if let CodeContextMenu::Completions(menu) = menu.as_ref()? {
@@ -23573,7 +23573,7 @@ impl Editor {
.insert(TypeId::of::<T>(), (color_fetcher, gutter_highlights));
}
- #[cfg(feature = "test-support")]
+ #[cfg(any(test, feature = "test-support"))]
pub fn all_text_highlights(
&self,
window: &mut Window,
@@ -23597,7 +23597,7 @@ impl Editor {
})
}
- #[cfg(feature = "test-support")]
+ #[cfg(any(test, feature = "test-support"))]
pub fn all_text_background_highlights(
&self,
window: &mut Window,
@@ -23627,7 +23627,7 @@ impl Editor {
res
}
- #[cfg(feature = "test-support")]
+ #[cfg(any(test, feature = "test-support"))]
pub fn search_background_highlights(&mut self, cx: &mut Context<Self>) -> Vec<Range<Point>> {
let snapshot = self.buffer().read(cx).snapshot(cx);
diff --git a/crates/gpui/Cargo.toml b/crates/gpui/Cargo.toml
index ddb7373c2ed..cce229a7d3c 100644
--- a/crates/gpui/Cargo.toml
+++ b/crates/gpui/Cargo.toml
@@ -31,7 +31,9 @@ leak-detection = ["backtrace"]
wayland = [
"bitflags",
]
-x11 = []
+x11 = [
+ "scap?/x11",
+]
screen-capture = [
"scap",
]