Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy entire line #16

Open
Christilut opened this issue Feb 25, 2019 · 1 comment
Open

Copy entire line #16

Christilut opened this issue Feb 25, 2019 · 1 comment

Comments

@Christilut
Copy link

Seems like the ring paste is behaving a bit different than normal paste.
When I put my cursor in a location anywhere on a line (without highlighting anything) and copy, then pasting somewhere else would paste the entire line.
The ring paste seems to only paste the text and not the line endings, so a copied line is pasted at the location of the cursor and not inserted above the current line, as I would expect.

@SrTobi
Copy link
Owner

SrTobi commented Feb 25, 2019

Yeah you are right. the behavior is different... I'm not sure how exactly to fix that... or if I even want to... it seems that vscode has the following behavior:

  • you copy a line by using the copy action and having nothing selected
  • you paste using the paste action and it will insert a new line before the one where the current caret is, regardless of where the caret is in that line

This is different from the following:

  • select a line, including the line ending
  • then use the copy action
  • now, use the paste action
  • it will now insert the copied text (including the line ending) exactly at the position the caret is.

I have to investigate this, because I don't even see how vscode decides between the two at the time you use paste.
Also... how would that behavior look for code clip ring? don't see it at the moment, because vscode inserts the line at another point from where the caret is, which doesn't go well with the code clip ring behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants