]> git.lyx.org Git - features.git/commitdiff
Fix bug #10195
authorGuillaume Munch <gm@lyx.org>
Mon, 13 Jun 2016 23:17:38 +0000 (00:17 +0100)
committerGuillaume Munch <gm@lyx.org>
Tue, 21 Jun 2016 00:51:42 +0000 (01:51 +0100)
The computation of the index of the main text entry of a row did not take into
account the fact that the entry could be optimised away.

(cherry picked from commit 947c34364c7f6a5c12ddfa7286ff504c62a1038a)

src/TexRow.cpp

index 8586a81c41d8fbaac884176d327a02cb8a951d77..400daf3a706757910ae15b01bac3a670c67aad78 100644 (file)
@@ -35,8 +35,11 @@ bool TexRow::RowEntryList::addEntry(RowEntry const & entry)
        if (!entry.is_math) {
                if (text_entry_ < size())
                        return false;
-               else
+               else {
                        text_entry_ = size();
+                       push_back(entry);
+                       return true;
+               }
        }
        forceAddEntry(entry);
        return true;