Does not allow to enter (trivially) regular expression insets in the document under edit.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31180 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Tommaso Cucinotta 2009-08-21 18:40:37 +00:00
parent 0029b4a217
commit 1c2d2f8fa4

View File

@ -939,9 +939,12 @@ bool BufferView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
break; break;
// @todo Test if current WorkArea is the search WorkArea // @todo Test if current WorkArea is the search WorkArea
case LFUN_REGEXP_MODE: case LFUN_REGEXP_MODE: {
flag.setEnabled(! this->cursor().inRegexped()); bool const embedded_workarea = buffer().isUnnamed()
&& buffer().fileName().extension() == "internal";
flag.setEnabled(embedded_workarea && ! this->cursor().inRegexped());
break; break;
}
case LFUN_LABEL_COPY_AS_REF: { case LFUN_LABEL_COPY_AS_REF: {
// if there is an inset at cursor, see whether it // if there is an inset at cursor, see whether it