Skip to content
New issue

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

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

Already on GitHub? # to your account

Inconsistent line breaks when pasting #861

Open
lug-gh opened this issue Feb 20, 2025 · 1 comment
Open

Inconsistent line breaks when pasting #861

lug-gh opened this issue Feb 20, 2025 · 1 comment

Comments

@lug-gh
Copy link

lug-gh commented Feb 20, 2025

What Happened?

For some time now, I can't say exactly how long, maybe 2 months, I've noticed that when pasting from the clipboard, the line breaks are often lost, but this is not consistent either, but it drives me crazy.

Steps to Reproduce

For example, I open a file with nano and insert the following:

Image

In nano it looks like this:

Image

Expected Behavior

The line breaks should be retained. If I paste the same clipboard into VS Code, for example, everything looks great:

Image

OS Version

7.x (Horus)

Session Type

Classic Session (X11, This is the default)

Software Version

Latest release (I have run all updates)

Log Output

Hardware Info

No response

@jeremypw
Copy link
Collaborator

Thank you for the report.

When pasting into nano you should use Control + U as indicated by the nano UI. If you use the Terminal shortcut then the formatting is incorrect presumably to do with how nano handles the input stream. The Terminal shortcut is intended for pasting into the bash shell when no foreground process is running (in which case each line is treated as a separate command). I do not think anything has recently changed in Terminal which would affect this so it may be due to a change in nano.

However I noticed that the Terminal context menu shows even when nano is running. I think this menu should be disabled when a foreground process is running.

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

No branches or pull requests

2 participants