zed icon indicating copy to clipboard operation
zed copied to clipboard

ctrl+c, ctrl+v on a line does paste under line

Open CrazieNewb opened this issue 1 year ago • 5 comments

Check for existing issues

  • [X] Completed

Describe the feature

When cursor is on a line, on vscode pressing CTRL+C then CTRL+V pastes under that line.

If applicable, add mockups / screenshots to help present your vision of the feature

Pressing CTRL+C then CTRL+V image Result: image Expected result: image

CrazieNewb avatar May 17 '24 11:05 CrazieNewb

Hey @CrazieNewb - which platform are you on? Windows?

JosephTLyons avatar May 18 '24 01:05 JosephTLyons

It seems the relevant piece of code is in this method https://github.com/zed-industries/zed/blob/a5b14de4012beebec512a6fc8c30d3638eed7d1b/crates/editor/src/editor.rs#L6050-L6086

a-usr avatar May 21 '24 08:05 a-usr

Hey @CrazieNewb - which platform are you on? Windows?

I am on linux.

To clarify, the expected behaviour is to copy a newline \r\n before the copied line.

CrazieNewb avatar May 21 '24 09:05 CrazieNewb

To clarify, the expected behaviour is to copy a newline \r\n before the copied line.

Isnt \r\n windows-specific? as far as i remember \n was always enough in unix world

a-usr avatar May 21 '24 10:05 a-usr

To clarify, the expected behaviour is to copy a newline \r\n before the copied line.

Isnt \r\n windows-specific? as far as i remember \n was always enough in unix world

I always thought its for backwards compatibility. Anyways, if i where to send code to someone with a system that didnt support \n there always a \r

CrazieNewb avatar May 21 '24 10:05 CrazieNewb