]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.cpp
* GuiDocument.cpp: before accessing the buffer() in paramsToDialog(), check
[lyx.git] / src / BufferView.cpp
index 92de71d7fe253177593bc0fd21b75a2378115f99..de2d71a1234aff48dbd5efd5ab33c5af8bd70616 100644 (file)
@@ -62,7 +62,6 @@
 #include "insets/InsetRef.h"
 #include "insets/InsetText.h"
 #include "insets/InsetNote.h"
-#include "insets/InsetERT.h"
 
 #include "frontends/alert.h"
 #include "frontends/Application.h"
@@ -1026,8 +1025,8 @@ bool BufferView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
                break;
 
        case LFUN_REGEXP_MODE:
-               // FIXME: Test if current WorkArea is the search WorkArea
-               flag.setEnabled(buffer().isInternal() && !cur.inRegexped() && !dynamic_cast<InsetERT*>(&cur.inset()));
+               flag.setEnabled(buffer().isInternal() && !cur.inRegexped()
+                               && cur.inset().lyxCode() != ERT_CODE);
                break;
 
        case LFUN_LABEL_COPY_AS_REF: {