buffer().setMacroLock();
loadIfNeeded();
buffer().clearMacroLock();
- if (child_buffer_)
- buffer().registerChild(child_buffer_, us, scope);
+ if (child_buffer_) {
+ // We want an iterator that just points at the location of this inset,
+ // whereas the one we were passed has us on top.
+ // At least, that is how the updateMacros code was before RKH modified
+ // it. That is not to say they quite understand why it was like that.
+ DocIterator it = us;
+ it.pop_back();
+ buffer().registerChild(child_buffer_, it, scope);
+ }
}