Tommaso Cucinotta schreef:
Vincent van Ravesteijn wrote:
!dynamic_cast<InsetERT*>(&cur.inset()));
I don't understand what  this means. Is this the same as:

   cur.inset().lyxCode() != ERT_CODE);

? If so, I'd favor this simple notation.
Yes, it is the same (language-level type recognition vs hand-coded lyx-specific one).


I understand, but it is always nice to have code that everyone and always understands.

By the way, are you sure that ERT is the only inset that should be excluding, or does this hold for all passThru Insets ? Then you should cur.paragraph().layout().pass_thru.

Compare with :

text3....@2659:

   if (cur.empty()
       || !cur.inset().insetAllowed(code)
       || cur.paragraph().layout().pass_thru))
       enable = false;

Last, why is the status of LFUN_REGEXP_MODE handled in BufferView.cpp while the dispatch is in Text3.cpp. Moreover, I would expect it to be next to LFUN_MATH_MODE as they seem to be related.

Vincent

Reply via email to