From bd21aa99d244cbfe532c4d970197a940355828dd Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sun, 2 Dec 2018 18:27:38 +0100 Subject: [PATCH] Fix bug #11398 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. --- src/Changes.cpp | 2 +- src/insets/InsetFloat.cpp | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Changes.cpp b/src/Changes.cpp index b4226582f4..5f8e3b21bf 100644 --- a/src/Changes.cpp +++ b/src/Changes.cpp @@ -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"); diff --git a/src/insets/InsetFloat.cpp b/src/insets/InsetFloat.cpp index c160daa4ab..9d92681dd2 100644 --- a/src/insets/InsetFloat.cpp +++ b/src/insets/InsetFloat.cpp @@ -447,10 +447,6 @@ void InsetFloat::latex(otexstream & os, OutputParams const & runparams_in) const // Force \end{} 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'); }