Skip to content

Commit

Permalink
Fix bug where copying from assistant panel appends extra newline to c…
Browse files Browse the repository at this point in the history
…lipboard (zed-industries#18090)

Closes zed-industries#17661

Release Notes:

- Fixed a bug where copying from the assistant panel appended an
additional newline to the end of the clipboard contents.
  • Loading branch information
JosephTLyons authored and noaccOS committed Oct 19, 2024
1 parent eb268d4 commit 8c57acb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/assistant/src/assistant_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
}
}
Expand Down

0 comments on commit 8c57acb

Please sign in to comment.