I'm new to Lyx and I'm hoping that the problems I'm encountering are just due to my ignorance. I have a large existing code base in my development environment which I am going to be copying into my Lyx document as program listings. I had an existing Latex document with program listings in it using the lstlisting environment. When I imported this document into Lyx all of the newlines in the program listings disappeared.
Similarly, if I copy code from my development environment (Visual Studio 2008) and paste it into a program listing block in Lyx all of the newlines are discarded. If I have a properly formatted program listing, with newlines, in a Lyx document and I export the Lyx document to a Latex file and then import the Latex file back into Lyx all of the newlines in program listing blocks disappear. It's terribly inconvenient and time-consuming to have to reinsert all of the newlines by hand and retyping the code in Lyx is also an unattractive option because I have so much of it and because this will certainly introduce transcription errors. Is this newline deletion a bug or is there something I can set to prevent the newlines from disappearing? This e-mail was created using speech recognition software. If the spelling, grammar, or wording seems strange it's the software's fault not mine.