How can I modify the anchor position of a selection ? void InsetListings::doDispatch(Cursor & cur, FuncRequest & cmd) { ++cur.anchor().pos() }
Or something like this.. In the following code, shouldn't we return a const CursorSlice and/or document that the returned CursorSlice isn't the true anchor, but a normalized _copy_ of the anchor ? /// access to normalized selection anchor CursorSlice Cursor::anchor() const { LASSERT(anchor_.depth() >= depth(), /**/); CursorSlice normal = anchor_[depth() - 1]; if (depth() < anchor_.depth() && top() <= normal) { // anchor is behind cursor -> move anchor behind the inset ++normal.pos(); } return normal; } Vincent