]> git.lyx.org Git - features.git/commitdiff
Fix reverse search when the View Source window is active.
authorEnrico Forestieri <forenr@lyx.org>
Sun, 24 May 2009 01:38:33 +0000 (01:38 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Sun, 24 May 2009 01:38:33 +0000 (01:38 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29834 a592a061-630c-0410-9148-cb99ea01b6c8

src/Buffer.cpp

index d9d9547df5d00f26556036b5e141fd24718756d5..b5dc10bd5637d3001fc996405ec5f7e4042f1cfe 100644 (file)
@@ -2417,9 +2417,9 @@ void Buffer::getSourceCode(odocstream & os, pit_type par_begin,
        // No side effect of file copying and image conversion
        runparams.dryrun = true;
 
-       d->texrow.reset();
        if (full_source) {
                os << "% " << _("Preview source code") << "\n\n";
+               d->texrow.reset();
                d->texrow.newline();
                d->texrow.newline();
                if (isDocBook())
@@ -2441,14 +2441,16 @@ void Buffer::getSourceCode(odocstream & os, pit_type par_begin,
                                        convert<docstring>(par_end - 1))
                           << "\n\n";
                }
-               d->texrow.newline();
-               d->texrow.newline();
+               TexRow texrow;
+               texrow.reset();
+               texrow.newline();
+               texrow.newline();
                // output paragraphs
                if (isDocBook())
                        docbookParagraphs(paragraphs(), *this, os, runparams);
                else 
                        // latex or literate
-                       latexParagraphs(*this, text(), os, d->texrow, runparams);
+                       latexParagraphs(*this, text(), os, texrow, runparams);
        }
 }