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 (#18090)

Closes #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 Sep 19, 2024
1 parent 1fc391f commit 27c1106
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 27c1106

Please sign in to comment.