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.

markdown: Make `cx` the last parameter to `Markdown::new_text` (#21497)

Marshall Bowers3019960f83e6
diff --git a/crates/editor/src/hover_popover.rs b/crates/editor/src/hover_popover.rs
index c402132bf34..9cac7dc7135 100644
--- a/crates/editor/src/hover_popover.rs
+++ b/crates/editor/src/hover_popover.rs
@@ -378,7 +378,7 @@ fn show_hover(
},
..Default::default()
};
- Markdown::new_text(text, markdown_style.clone(), None, cx, None)
+ Markdown::new_text(text, markdown_style.clone(), None, None, cx)
})
.ok();
diff --git a/crates/markdown/src/markdown.rs b/crates/markdown/src/markdown.rs
index 39217b69305..cdb464877d0 100644
--- a/crates/markdown/src/markdown.rs
+++ b/crates/markdown/src/markdown.rs
@@ -97,8 +97,8 @@ impl Markdown {
source: String,
style: MarkdownStyle,
language_registry: Option<Arc<LanguageRegistry>>,
- cx: &ViewContext<Self>,
fallback_code_block_language: Option<String>,
+ cx: &ViewContext<Self>,
) -> Self {
let focus_handle = cx.focus_handle();
let mut this = Self {
diff --git a/crates/recent_projects/src/ssh_connections.rs b/crates/recent_projects/src/ssh_connections.rs
index a9aeacadd84..1c084bbf6e9 100644
--- a/crates/recent_projects/src/ssh_connections.rs
+++ b/crates/recent_projects/src/ssh_connections.rs
@@ -201,7 +201,7 @@ impl SshPrompt {
selection_background_color: cx.theme().players().local().selection,
..Default::default()
};
- let markdown = cx.new_view(|cx| Markdown::new_text(prompt, markdown_style, None, cx, None));
+ let markdown = cx.new_view(|cx| Markdown::new_text(prompt, markdown_style, None, None, cx));
self.prompt = Some((markdown, tx));
self.status_message.take();
cx.focus_view(&self.editor);