Hey, I just managed to reproduce your error.
I notice the same, its only text lines with faces (ie: color) that have spaces to the end. Text w/o faces or color copy and pastes normally.
I tried xterm and urxvt, and a few terminal types. It is consistent. Emacs may have an issue with spaces when it's coloring text.
If I start xterm with the "trimSelection: true" configuration, I no longer get space.
Or place that in your ~/.Xdefaults.
I notice the same, its only text lines with faces (ie: color) that have spaces to the end. Text w/o faces or color copy and pastes normally.
I tried xterm and urxvt, and a few terminal types. It is consistent. Emacs may have an issue with spaces when it's coloring text.
If I start xterm with the "trimSelection: true" configuration, I no longer get space.
xterm -xrm 'XTerm*trimSelection: true'
Or place that in your ~/.Xdefaults.