]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetFlex.cpp
Properly terminate command
[lyx.git] / src / insets / InsetFlex.cpp
index 61e47d4c367f1737a4e69e821937b4abf09040a9..31828b615ffbd808ea7e972e2c3ecbd252114b35 100644 (file)
@@ -146,9 +146,13 @@ void InsetFlex::updateBuffer(ParIterator const & it, UpdateType utype)
        docstring const & count = il.counter();
        bool const have_counter = cnts.hasCounter(count);
        if (have_counter) {
-               cnts.step(count, utype);
-               custom_label += ' ' +
-                       cnts.theCounter(count, it.paragraph().getParLanguage(bp)->code());
+               Paragraph const & par = it.paragraph();
+               if (!par.isDeleted(it.pos())) {
+                       cnts.step(count, utype);
+                       custom_label += ' ' +
+                               cnts.theCounter(count, it.paragraph().getParLanguage(bp)->code());
+               } else
+                       custom_label += ' ' + from_ascii("#");
        }
        setLabel(custom_label);