Have you discovered the super cool part of jfarmer's suggestion?
You can select and copy the wrapped text (code), and the lines, when pasted, are not wrapped. In other words, the line breaks in the original text/code remain intact.
With a bit of userContent.css manipulation in firefox, you can force this on all places (<pre>, <code>, ...) where it's useful.