On Fri, Oct 18, 2002 at 10:31:39AM +0200, Nicolas SABOURET wrote: > I thought I had already sent a file. However, please find in attachement > "bugreport.lyx". Open with lyx, simply view DVI output and note how the > second item is preceeded by a bullet instead of a dash (as it should be > in french, like the fisrt item shows). > The language wasn't switched back to "french" after the "code" part in > english. > Note that I do not "need" to set this specific code in english. However, > in the general case, code can contain ":" or ";" and this has to be in > english style, otherwise it becomes " :" and " ;" in the dvi output. > Now this doesn't matter: the language should switch back to french, > shouldn't it ?
Here is a patch for this bug. OK to apply ? (and to 1.2.2cvs ?) BTW, the code look quite ugly. I might change it after 1.3.
Index: paragraph.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph.C,v retrieving revision 1.229 diff -u -p -r1.229 paragraph.C --- paragraph.C 9 Sep 2002 17:32:51 -0000 1.229 +++ paragraph.C 20 Oct 2002 20:44:26 -0000 @@ -1024,8 +1024,10 @@ Paragraph * Paragraph::TeXOnePar(Buffer if (language->babel() != previous_language->babel() // check if we already put language command in TeXEnvironment() && !(style->isEnvironment() - && (!previous() || previous()->layout() != layout() || - previous()->params().depth() != params().depth()))) + && (!previous() || + (previous()->layout() != layout() && + previous()->params().depth() <= params().depth()) + || previous()->params().depth() < params().depth()))) { if (!lyxrc.language_command_end.empty() && previous_language->babel() != doc_language->babel())