I've encountered this issue on other platforms like Termux on Android or when connected over ssh, but never on Ubuntu using nano.
- I'm using Ubuntu 20.04 and GNU nano, version 4.8.
- using the dialog menu or CTRL+SHIFT+C and CTRL+SHIFT+V to paste
- I need to see the entire line of text at once, so if the line is too long for the terminal, I've always had nano set for line wrapping.
But now, when I copy a line that is wrapped, nano is pasting an extra line break where every line wrap exists instead of pasting as a single line. No matter how many times it's wrapped on my screen, it should copy as a single line and paste as a single line with no line breaks.
I'm at a loss because I didn't change anything and I don't remember having this problem with nano in the past on Ubuntu.
Here is an example of a long line with the letter j:
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
As you can see, three lines are pasted instead of one.
However if I echo
or cat
the same line and then copy the wrapped output from my terminal, it pastes as a single line.
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
Tried on both xfce4-terminal and guake. Same problem. Also, I've tried softwrap
with and without the following options:
nowrap
atblanks
hardwrap
- and even
nonewlines
for good measure
and I checked /etc/nanorc
, ~/.nanorc
, and /usr/share/nano/*.nanorc
for any conflicting configurations.