From d41c3f27d9192bd3b0de89a04ccf2fcf16bb4c91 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Tue, 10 Jul 2018 07:11:59 +0200 Subject: [PATCH] Disallow any inset inside ERT Attempting to do this crashes in master, and is not supported anyway. --- src/insets/InsetERT.cpp | 3 +++ src/insets/InsetERT.h | 2 ++ 2 files changed, 5 insertions(+) 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_; }; -- 2.39.2