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:
parent
1fc391f696
commit
27c1106fad
1 changed files with 3 additions and 1 deletions
|
@ -3533,10 +3533,12 @@ impl ContextEditor {
|
||||||
for chunk in context.buffer().read(cx).text_for_range(range) {
|
for chunk in context.buffer().read(cx).text_for_range(range) {
|
||||||
text.push_str(chunk);
|
text.push_str(chunk);
|
||||||
}
|
}
|
||||||
|
if message.offset_range.end < selection.range().end {
|
||||||
text.push('\n');
|
text.push('\n');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(text, CopyMetadata { creases })
|
(text, CopyMetadata { creases })
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue