Fix bug where copying from assistant panel appends extra newline to clipboard (#18090)

Closes https://github.com/zed-industries/zed/issues/17661

Release Notes:

- Fixed a bug where copying from the assistant panel appended an
additional newline to the end of the clipboard contents.
This commit is contained in:
Joseph T. Lyons 2024-09-19 13:26:14 -04:00 committed by GitHub
parent 1fc391f696
commit 27c1106fad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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');
}
}
}
}