In my experience copying from some programs preserves long lines. Copying from other programs breaks them at the wrap point. Once the text is cut into lines, pasting can't fix it. I'm not at my computer now so I can't give factual examples. I guess that copying from the output of cat file on a terminal is one of those unfortunate cases.
If it is that much code attach a file or github link to gist or PR.
In my experience copying from some programs preserves long lines. Copying from other programs breaks them at the wrap point. Once the text is cut into lines, pasting can't fix it. I'm not at my computer now so I can't give factual examples. I guess that copying from the output of cat file on a terminal is one of those unfortunate cases.