]> git.lyx.org Git - features.git/commitdiff
Make fixIfBroken() more robust
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 15 Jun 2017 09:49:49 +0000 (11:49 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 15 Jun 2017 09:53:33 +0000 (11:53 +0200)
Chop slice when its inset is not editable.

Fixes bug #10667.

src/DocIterator.cpp

index 51b44d88ef00b153c0ec9155afcfd16203fbb9af..3d9bd6892b79fc112f3913f4c837745ef7b8c890 100644 (file)
@@ -562,7 +562,7 @@ bool DocIterator::fixIfBroken()
        size_t n = slices_.size();
        for (; i != n; ++i) {
                CursorSlice & cs = slices_[i];
-               if (&cs.inset() != inset) {
+               if (&cs.inset() != inset || !cs.inset().editable()) {
                        // the whole slice is wrong, chop off this as well
                        --i;
                        LYXERR(Debug::DEBUG, "fixIfBroken(): inset changed");