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

Paste swallows newlines from the web... Gitlab #5736

Closed
FossPrime opened this issue May 4, 2020 · 9 comments
Closed

Paste swallows newlines from the web... Gitlab #5736

FossPrime opened this issue May 4, 2020 · 9 comments
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@FossPrime
Copy link

FossPrime commented May 4, 2020

I'm pasting some code from gitlab, but the new lines are missing... ending up is a garbled mess.... what's going on?

When I paste from the notepad, everything works as expected

Reproduction:

  1. Go to: https://gitlab.com/olaris/ffmpeg-static/-/blob/master/build.sh
  2. Copy the first 10 lines, in view or edit mode
  3. paste into nano

Watch a garbled mess

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels May 4, 2020
@zadjii-msft
Copy link
Member

What version of the Terminal are you running?

What application are you running in the Terminal that you're trying to paste into?

Could you share some screenshots perhaps?

@zadjii-msft zadjii-msft added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label May 4, 2020
@DHowett-MSFT
Copy link
Contributor

In addition, do you mean “when I paste it into notepad and then copy it again and paste it into Terminal”?

I’ve never had good luck pasting content directly from GitHub or GitLab.

@DHowett-MSFT
Copy link
Contributor

(In any application.)

@FossPrime
Copy link
Author

Updated my reproduction in original post... I'm used to it working pretty well under Ubuntu/mac/Fedora. with iTerm, Gnome terminal and Terminator. Looks like a workaround is to show the raw file.

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels May 4, 2020
@DHowett-MSFT
Copy link
Contributor

So, I copied this from here:

image

to here...

image

So I've got to ask for more info: what version of nano? are you using WSL? gow? cygwin?

@DHowett-MSFT DHowett-MSFT added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels May 4, 2020
@FossPrime
Copy link
Author

FossPrime commented May 4, 2020

WSL Debian, I don't recall ever using terminal for any other shell. Not sure how WSL works, but Ubuntu 20.04 and Debian should be near identical, as 20.04 is an LTS release which are based on the latest Debian distro release... main difference being the GUI, which WSL lacks anyway

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels May 4, 2020
@DHowett-MSFT
Copy link
Contributor

DHowett-MSFT commented May 5, 2020

Okay, this one doesn't have a great resolution. When we take text off the clipboard, we replace \r\n with \r. This is correct (and this is how a bunch of other terminal emulators do paste manipulation as well.)

There's an additional wrinkle, though.

nano interprets \r as the [J]ustify (^J) command.

It looks like this works on other terminals because nano also requests "bracketed paste" mode. When bracketed paste is supported, it can know that content is coming in off the clipboard and suppress the justify action.

This'll be a /dupe of #395 with a little bit of nano flair thrown in.

@ghost
Copy link

ghost commented May 5, 2020

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed May 5, 2020
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements Needs-Attention The core contributors need to come back around and look at this ASAP. labels May 5, 2020
@ghost
Copy link

ghost commented May 5, 2020

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

3 participants