On Fri, Dec 23, 2005 at 10:53:28AM +0100, Jean-Marc Lasgouttes wrote: > 1/ copy this seemingly (to me) fragile code to macroModeClose > -or- > 2/ invoke dispatch directly (but add a warning telling this should be fixed) > -or- > 3/ create yet another LCursor::fooInsert method, inorder to make > really sure that people will never be able to figure out which one > should be used :) > > > Andre> Have you checked this leaves the callers intact? > > Andre> I.e. typed \frac<Ctrl-Left> and such? > > Erm. It crashes :(
As suspected. Most callers of macrModeClose rely on the fact that the cursor does not move. > So, what do you propose? I guess I could keep mathMacroClose as it > was, Yes. > and put the cursor inside the new inset only when space was pressed? Yes. And edit(cur, false) or similar could help. Or check whether the freshly created inset has cells (nargs() > 0), nter it (push_something), set idx and pos (call idxFirst or such). Andre'