]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathNest.cpp
fix a crash when the inset containing the new word at cursor is deleted
[lyx.git] / src / mathed / InsetMathNest.cpp
index e400974c94df5ed7decbf23087af57412ce1283f..1c6437d9737f907386b87ed5390775e3ad7aa36a 100644 (file)
@@ -394,12 +394,14 @@ void InsetMathNest::normalize(NormalStream & os) const
 }
 
 
-int InsetMathNest::latex(odocstream & os, OutputParams const & runparams) const
+int InsetMathNest::latex(otexstream & os, OutputParams const & runparams) const
 {
-       WriteStream wi(os, runparams.moving_arg, true,
+       WriteStream wi(os.os(), runparams.moving_arg, true,
                       runparams.dryrun ? WriteStream::wsDryrun : WriteStream::wsDefault,
                       runparams.encoding);
+       wi.canBreakLine(os.canBreakLine());
        write(wi);
+       os.canBreakLine(wi.canBreakLine());
        return wi.line();
 }