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 text overlap with markdown code block in list in agent response (#30377)

Michael Sloan0abee5668a82
diff --git a/crates/agent/src/active_thread.rs b/crates/agent/src/active_thread.rs
index 6d039c8e68e..9182aa0c8a3 100644
--- a/crates/agent/src/active_thread.rs
+++ b/crates/agent/src/active_thread.rs
@@ -600,14 +600,8 @@ fn render_markdown_code_block(
.bg(cx.theme().colors().editor_background)
.child(codeblock_header)
.when(
- metadata.line_count > MAX_UNCOLLAPSED_LINES_IN_CODE_BLOCK,
- |this| {
- if is_expanded {
- this.h_full()
- } else {
- this.max_h_80()
- }
- },
+ metadata.line_count > MAX_UNCOLLAPSED_LINES_IN_CODE_BLOCK && !is_expanded,
+ |this| this.max_h_80(),
)
}