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 lag when interacting with `MarkdownElement` (#31585)

Antonio Scandurra957e4adc3f2c
diff --git a/crates/markdown/src/markdown.rs b/crates/markdown/src/markdown.rs
index da9f3fee857..26df526c52a 100644
--- a/crates/markdown/src/markdown.rs
+++ b/crates/markdown/src/markdown.rs
@@ -1209,6 +1209,7 @@ impl Element for MarkdownElement {
) -> Self::PrepaintState {
let focus_handle = self.markdown.read(cx).focus_handle.clone();
window.set_focus_handle(&focus_handle, cx);
+ window.set_view_id(self.markdown.entity_id());
let hitbox = window.insert_hitbox(bounds, false);
rendered_markdown.element.prepaint(window, cx);