tomm...@lyx.org schreef:
Author: tommaso
Date: Sun Jan 31 22:38:18 2010
New Revision: 33302
URL: http://www.lyx.org/trac/changeset/33302

Log:
Inhibits insertion of Regexp insets within InsetERT context (and fixes #6495).

Modified:
   lyx-devel/trunk/src/BufferView.cpp

Modified: lyx-devel/trunk/src/BufferView.cpp
==============================================================================
--- lyx-devel/trunk/src/BufferView.cpp  Sun Jan 31 21:51:15 2010        (r33301)
+++ lyx-devel/trunk/src/BufferView.cpp  Sun Jan 31 22:38:18 2010        (r33302)
@@ -62,6 +62,7 @@
 #include "insets/InsetRef.h"
 #include "insets/InsetText.h"
 #include "insets/InsetNote.h"
+#include "insets/InsetERT.h"

Please keep the includes sorted alpabetically.

 #include "frontends/alert.h"
 #include "frontends/Application.h"
@@ -1026,7 +1027,7 @@
case LFUN_REGEXP_MODE:
                // FIXME: Test if current WorkArea is the search WorkArea
-               flag.setEnabled(buffer().isInternal() && !cur.inRegexped());
+ flag.setEnabled(buffer().isInternal() && !cur.inRegexped() &&

Please keep the length of the lines to a maximum of 80 characters.

!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.

Vincent

Reply via email to