[LyX/master] Fix crash (missing Buffer update)
Juergen Spitzmueller
spitz at lyx.org
Thu Jan 14 16:17:36 UTC 2021
commit f24fa552de42ebe203a1545c02e31da643ad60b9
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Thu Jan 14 17:17:58 2021 +0100
Fix crash (missing Buffer update)
---
src/insets/InsetCommand.cpp | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/insets/InsetCommand.cpp b/src/insets/InsetCommand.cpp
index 67ff5fc..9ca958b 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);
}
More information about the lyx-cvs
mailing list