When I copy and paste text using the X11 mouse selection between two terminal windows, tabs are often, but not always, converted to spaces. This appears to depend on the involved terminal applications and the programs running inside them.
This is what I've found out by experimentation:
- It depends solely on what's running on the source (copy) side. The target (paste) side will paste tabs no matter what is running, if the source preserved them.
gnome-terminalon the source side preserves tabs.
- Tabs are only preserved if the file has been output using
cat. Other applications such as
nanodon't preserve tabs.
What is the explanation for this? Are these bugs in
xterm, or can they be configured differently? Can
less and such be configured to preserve tabs in output?