From f24fa552de42ebe203a1545c02e31da643ad60b9 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Thu, 14 Jan 2021 17:17:58 +0100 Subject: [PATCH] Fix crash (missing Buffer update) --- src/insets/InsetCommand.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/insets/InsetCommand.cpp b/src/insets/InsetCommand.cpp index 67ff5fc6b6..9ca958b5f8 100644 --- a/src/insets/InsetCommand.cpp +++ b/src/insets/InsetCommand.cpp @@ -216,6 +216,9 @@ void InsetCommand::doDispatch(Cursor & cur, FuncRequest & cmd) } InsetCommandParams p(p_.code()); InsetCommand::string2params(to_utf8(cmd.argument()), p); + if (p == p_) + // no change + break; if (p.getCmdName().empty()) cur.noScreenUpdate(); else { @@ -226,6 +229,8 @@ void InsetCommand::doDispatch(Cursor & cur, FuncRequest & cmd) string const data = InsetCommand::params2string(p); lyx::dispatch(FuncRequest(LFUN_INSET_INSERT, data)); lyx::dispatch(FuncRequest(LFUN_CHAR_DELETE_FORWARD)); + cur.forceBufferUpdate(); + break; } else setParams(p); } -- 2.39.2