When deciding how to strike out deleted math in change-tracking
mode, differentiate only on begin-of-line or not, and not on
after-paragraph-break or not.

The assumption that a new paragraph is always started after a
float seems to be not true and was causing this bug.
This commit is contained in:
Enrico Forestieri 2018-12-02 18:27:38 +01:00
parent 42dda03689
commit bd21aa99d2
2 changed files with 1 additions and 5 deletions

View File

@ -428,7 +428,7 @@ int Changes::latexMarkChange(otexstream & os, BufferParams const & bparams,
// signature needed by \lyxsout to correctly strike out display math
if (change.type == Change::DELETED && runparams.inDisplayMath
&& !dvipost) {
if (os.afterParbreak())
if (os.lastChar() == '\n')
str += from_ascii("\\\\\\noindent\n");
else
str += from_ascii("\\\\\\\\\n");

View File

@ -447,10 +447,6 @@ void InsetFloat::latex(otexstream & os, OutputParams const & runparams_in) const
// Force \end{<floatname>} to appear in a new line.
os << breakln << "\\end{" << from_ascii(tmptype) << "}\n";
// A new paragraph is always started after a float. Hence, simulate a
// blank line so that os.afterParbreak() returns true (see bug 11174).
os.lastChar('\n');
}