commit bd21aa99d244cbfe532c4d970197a940355828dd
Author: Enrico Forestieri <[email protected]>
Date:   Sun Dec 2 18:27:38 2018 +0100

    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 insertions(+), 5 deletions(-)

diff --git a/src/Changes.cpp b/src/Changes.cpp
index b422658..5f8e3b2 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 c160daa..9d92681 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{<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');
 }
 
 

Reply via email to