// this is the code for a normal delete, not pasting
// any paragraphs
cur.recordUndo(DELETE_UNDO);
- if(!par.eraseChar(cur.pos(), cur.buffer().params().trackChanges)) {
+ bool const was_inset = cur.paragraph().isInset(cur.pos());
+ if(!par.eraseChar(cur.pos(), cur.buffer().params().trackChanges))
// the character has been logically deleted only => skip it
cur.top().forwardPos();
- }
- cur.checkBufferStructure();
+
+ if (was_inset)
+ updateLabels(cur.buffer());
+ else
+ cur.checkBufferStructure();
needsUpdate = true;
} else {
if (cur.pit() == cur.lastpit())
// without the dreaded mechanism. (JMarc)
setCursorIntern(cur, cur.pit(), cur.pos() - 1,
false, cur.boundary());
+ bool const was_inset = cur.paragraph().isInset(cur.pos());
cur.paragraph().eraseChar(cur.pos(), cur.buffer().params().trackChanges);
- cur.checkBufferStructure();
+ if (was_inset)
+ updateLabels(cur.buffer());
+ else
+ cur.checkBufferStructure();
}
if (cur.pos() == cur.lastpos())