On Mon, Jul 15, 2002 at 09:08:13AM +0200, Juergen Vigna wrote: > > I would say because there are actions not given by a cursor movement > which will have to move the cursor to the position. Maybe UP is not > one of them but _before_ and _behind_ are needed so I think we should > have all 4 directions and do not have to reinterpret lfuns outside > again. What problem do you have with this? Heed that just FINISHED > is not enough as result value.
For RTL I need to have a distinction between FINISHED_LEFT/RIGHT and FINISHED_BEFORE/AFTER, so in other words, we will need to have 6 FINISHED* values. But looking at the source, the only places where FINISHED* is returned when the action is not LFUN_LEFT/RIGHT/UP/DOWN are: 1) in insettext.C/insettabular.C if ((action < 0) && arg.empty()) return FINISHED; Why is this needed ? Can action be < 0 ?? 2) In formulabase.C if (!arg.empty()) { bv->lockedInsetStoreUndo(Undo::EDIT); if (arg.size() == 1) result = mathcursor->interpret(arg[0]) ? DISPATCHED : FINISHED_RIGHT; This is used to exit from the inset when pressing space at the end. As I said, we can only have one FINISHED value. If the action performed was LFUN_LEFT/RIGHT/..., then it dictates the cursor movement in the parent paragraph. Otherwise, the cursor is put after the inset.