]> git.lyx.org Git - lyx.git/blobdiff - src/DocIterator.cpp
Revert "Fixup 0cbe0d7a: avoid double redraw when completion is finished"
[lyx.git] / src / DocIterator.cpp
index 7c1924cb4586a95d5fc1edab17b9f1b71a06689d..31a5bffcafe0f47630b2da56ce009df69c61b6ef 100644 (file)
@@ -549,6 +549,11 @@ void DocIterator::updateInsets(Inset * inset)
        size_t const n = slices_.size();
        slices_.resize(0);
        for (size_t i = 0 ; i < n; ++i) {
+               if (dit[i].empty() && pos() > 0 && prevMath().lyxCode() == MATH_SCRIPT_CODE)
+                       // Workaround: With empty optional argument and a trailing script,
+                       // we have empty slices in math macro args (#11676)
+                       // FIXME: Find real cause!
+                       continue;
                LBUFERR(inset);
                push_back(dit[i]);
                top().inset_ = inset;