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

Copying Multi Line from Terminal Inserts Line Breaks #2256

Closed
cancan101 opened this issue Mar 6, 2017 · 7 comments · Fixed by #2638
Closed

Copying Multi Line from Terminal Inserts Line Breaks #2256

cancan101 opened this issue Mar 6, 2017 · 7 comments · Fixed by #2638

Comments

@cancan101
Copy link
Contributor

When I copy text from a jupyter notebook terminal session that spans multiple lines, line breaks are inserted.

@takluyver
Copy link
Member

Can you describe a bit more the results and what you expected? Thanks.

@cancan101
Copy link
Contributor Author

I run:

# python -c 'print("M"*455)'

And I get (notice the line breaks when I copy out of the terminal):

MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

@takluyver
Copy link
Member

I think that's not unusual for terminal emulators, although modern ones (including Gnome terminal, which I use) preserve it without the linebreaks. If you want to chase it up, the terminal component we use is xterm.js, so that's where it would need to be changed. See maybe xtermjs/xterm.js#404.

@cancan101
Copy link
Contributor Author

I think this is the upstream issue: xtermjs/xterm.js#443.

@cancan101
Copy link
Contributor Author

This has now been fixed in: xtermjs/xterm.js#693

@takluyver
Copy link
Member

Thanks @cancan101 . We should remember to update our version of xterm when there's a release with that fix.

@cancan101
Copy link
Contributor Author

Okay, 2.8.0 has been released with the fix: https://github.com/sourcelair/xterm.js/releases/tag/2.8.0

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants