If you copy from the editor, or leafpad, the same thing happens. You can try other text editors.
If you change the width of the window, the space to the end of the line is highlighted, no matter how wide the window is.
As I said, I think it is just the way it is displayed on the screen.