I usually edit text in a terminal using emacs -nw
and I notice that when I select a region in emacs -nw
and middle-click paste into anything, it copies all the empty characters in the selection as spaces. This also happens if I use the key-binding for Copy and then Paste. For example, if I highlight:
[(column-number-mode) ]
where the area inside the brackets is the selected area, it will copy all the empty characters in the block as spaces, i.e. (column-number-mode)
, even though the original text has a new line after the ending )
and I should only see (column-number-mode)
pasted.
This problem doesn't happen with vi
in the terminal nor does it happen with emacs window mode. I use Terminator, but the problem isn't specific to that, it occurs in xfce4-terminal as well. I use XFCE4 as my window manager, but I don't think that should change the selection behavior. Any ideas?