From: Juergen Spitzmueller Date: Tue, 10 Jul 2018 05:11:59 +0000 (+0200) Subject: Disallow any inset inside ERT X-Git-Tag: lyx-2.4.0dev-acb2ca7b~3299 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d41c3f27d9192bd3b0de89a04ccf2fcf16bb4c91;p=features.git Disallow any inset inside ERT Attempting to do this crashes in master, and is not supported anyway. --- diff --git a/src/insets/InsetERT.cpp b/src/insets/InsetERT.cpp index 2566547103..388abe45ae 100644 --- a/src/insets/InsetERT.cpp +++ b/src/insets/InsetERT.cpp @@ -188,6 +188,9 @@ bool InsetERT::getStatus(Cursor & cur, FuncRequest const & cmd, case LFUN_INSET_END_EDIT: status.setEnabled(tempfile_ != 0); return true; + case LFUN_INSET_INSERT: + status.setEnabled(false); + return true; case LFUN_INSET_MODIFY: if (cmd.getArg(0) == "ert") { status.setEnabled(true); diff --git a/src/insets/InsetERT.h b/src/insets/InsetERT.h index bfe15126da..ba62977d09 100644 --- a/src/insets/InsetERT.h +++ b/src/insets/InsetERT.h @@ -80,6 +80,8 @@ private: /// bool allowSpellCheck() const { return false; } /// + bool insetAllowed(InsetCode /* code */) const { return false; } + /// unique_ptr tempfile_; };