mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-10 18:58:10 +00:00
Disallow any inset inside ERT
Attempting to do this crashes in master, and is not supported anyway.
This commit is contained in:
parent
a007b65202
commit
d41c3f27d9
@ -188,6 +188,9 @@ bool InsetERT::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
case LFUN_INSET_END_EDIT:
|
case LFUN_INSET_END_EDIT:
|
||||||
status.setEnabled(tempfile_ != 0);
|
status.setEnabled(tempfile_ != 0);
|
||||||
return true;
|
return true;
|
||||||
|
case LFUN_INSET_INSERT:
|
||||||
|
status.setEnabled(false);
|
||||||
|
return true;
|
||||||
case LFUN_INSET_MODIFY:
|
case LFUN_INSET_MODIFY:
|
||||||
if (cmd.getArg(0) == "ert") {
|
if (cmd.getArg(0) == "ert") {
|
||||||
status.setEnabled(true);
|
status.setEnabled(true);
|
||||||
|
@ -80,6 +80,8 @@ private:
|
|||||||
///
|
///
|
||||||
bool allowSpellCheck() const { return false; }
|
bool allowSpellCheck() const { return false; }
|
||||||
///
|
///
|
||||||
|
bool insetAllowed(InsetCode /* code */) const { return false; }
|
||||||
|
///
|
||||||
unique_ptr<support::TempFile> tempfile_;
|
unique_ptr<support::TempFile> tempfile_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user