>> More important, I'm still not sure why we forbid the REGEXP_MODE in >> ERTs. Why does LyX crash ? >It's happening here: Text::regexpDispatch() > > cur.nextInset()->edit(cur, true); > >simply replacing with > > if (cur.nextInset()) { > cur.nextInset()->edit(cur, true); > cur.niceInsert(sel); > } > >prevents the crash, but the regexp inset seems to not have been inserted >at all (or, if it is, then it is not shown and the cursor cannot navigate on it).
Yes, of course. The code is now never executed because cur.nextInset() is false. And it returns false because the inset has not been inserted. Vincent