Paragraph & par = pars_[pit];
ParagraphParameters params = par.params();
params.read(argument, merge);
+ // changes to label width string apply to all
+ // paragraph with same layout in a sequence
+ setLabelWidthStringToSequence(pit, pars_,
+ params.labelWidthString());
par.params().apply(params, par.layout());
}
}
for (pit_type pit = cur.selBegin().pit(), end = cur.selEnd().pit();
pit <= end; ++pit) {
Paragraph & par = pars_[pit];
+ // changes to label width string apply to all
+ // paragraph with same layout in a sequence
+ setLabelWidthStringToSequence(pit, pars_,
+ par.params().labelWidthString());
par.params().apply(p, par.layout());
}
}
if (!front && cur.pos() == 0)
return false;
Inset * inset = front ? cur.nextInset() : cur.prevInset();
- if (!inset || inset->editable() != Inset::HIGHLY_EDITABLE)
+ if (!inset || !inset->editable())
return false;
/*
* Apparently, when entering an inset we are expected to be positioned
return false;
Paragraph & par = cur.paragraph();
Inset * inset = par.isInset(cur.pos()) ? par.getInset(cur.pos()) : 0;
- if (!inset || inset->editable() != Inset::HIGHLY_EDITABLE)
+ if (!inset || !inset->editable())
return false;
inset->edit(cur, movingForward,
movingLeft ? Inset::ENTRY_DIRECTION_RIGHT : Inset::ENTRY_DIRECTION_LEFT);
// delete the LineSeparator.
// MISSING
- bool const same_inset = &old.inset() == &cur.inset();
- bool const same_par = same_inset && old.pit() == cur.pit();
- bool const same_par_pos = same_par && old.pos() == cur.pos();
+ // Find a common inset and the corresponding depth.
+ size_t depth = 0;
+ for (; depth < cur.depth(); ++depth)
+ if (&old.inset() == &cur[depth].inset())
+ break;
+ // Whether a common inset is found and whether the cursor is still in
+ // the same paragraph (possibly nested).
+ bool const same_par = depth < cur.depth() && old.pit() == cur[depth].pit();
+ bool const same_par_pos = depth == cur.depth() - 1 && same_par
+ && old.pos() == cur[depth].pos();
+
// If the chars around the old cursor were spaces, delete one of them.
if (!same_par_pos) {
// Only if the cursor has really moved.
// automated way in CursorSlice code. (JMarc 26/09/2001)
// correct all cursor parts
if (same_par) {
- fixCursorAfterDelete(cur.top(), old.top());
+ fixCursorAfterDelete(cur[depth], old.top());
need_anchor_change = true;
}
return true;