This attempt to avoid recursive macros should be obsolete now.
SVN commit log:If the cursor is currently in macro mode (e.g. the user is typing \fra, but
hasn't finished the command \frac) macros shouldn't be updated.Another forced screen update is needed if the user leaves macro mode just with
the cursor right key (which doesn't trigger full screen updates itself). Schimmi Index: cursor.C =================================================================== --- cursor.C (Revision 17858) +++ cursor.C (Arbeitskopie) @@ -898,15 +898,12 @@ // do nothing if the macro name is empty if (s == "\\") return false; + + // trigger updates of macros, at least, if no full + // updates take place anyway + updateFlags(Update::Force); - // prevent entering of recursive macros - // FIXME: this is only a weak attempt... only prevents immediate - // recursion docstring const name = s.substr(1); - InsetBase const * macro = innerInsetOfType(InsetBase::MATHMACRO_CODE); - if (macro && macro->getInsetName() == name) - lyxerr << "can't enter recursive macro" << endl; - InsetMathNest * const in = inset().asInsetMath()->asNestInset(); if (in && in->interpretString(*this, s)) return true; Index: BufferView.C =================================================================== --- BufferView.C (Revision 17858) +++ BufferView.C (Arbeitskopie) @@ -357,7 +357,8 @@ LYXERR(Debug::WORKAREA) << "BufferView::update" << std::endl; // Update macro store - buffer_->buildMacros(); + if (!(cursor().inMathed() && cursor().inMacroMode())) + buffer_->buildMacros(); // Now do the first drawing step if needed. This consists on updating // the CoordCache in updateMetrics().
PGP.sig
Description: Signierter Teil der Nachricht