Skip to content

Commit

Permalink
markdown: Make cx the last parameter to Markdown::new_text (#21497)
Browse files Browse the repository at this point in the history
This PR is a follow-up to
#21487 to make sure that the
`cx` is the last parameter to `Markdown::new_text` as well.

Release Notes:

- N/A
  • Loading branch information
maxdeviant authored Dec 3, 2024
1 parent 9f459ba commit 3019960
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/editor/src/hover_popover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion crates/markdown/src/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion crates/recent_projects/src/ssh_connections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3019960

Please sign in to comment.