Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix bug where copying from assistant panel appends extra newline to clipboard (#18090)
Joseph T. Lyons27c1106fadef
diff --git a/crates/assistant/src/assistant_panel.rs b/crates/assistant/src/assistant_panel.rsindex da176ebeee6..364c6f96631 100644--- a/crates/assistant/src/assistant_panel.rs+++ b/crates/assistant/src/assistant_panel.rs@@ -3533,7 +3533,9 @@ impl ContextEditor {for chunk in context.buffer().read(cx).text_for_range(range) {text.push_str(chunk);}- text.push('\n');+ if message.offset_range.end < selection.range().end {+ text.push('\n');+ }}}}