[LyX/master] Fix #12104

Richard Kimberly Heck rikiheck at lyx.org
Tue Feb 2 22:20:47 UTC 2021


commit b6c089afa468159637e6ea14acb3ca1e14364d70
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date:   Tue Feb 2 17:23:00 2021 -0500

    Fix #12104
---
 src/Text.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Text.cpp b/src/Text.cpp
index 19b3af5..b00f10d 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -895,11 +895,11 @@ void Text::insertStringAsLines(Cursor & cur, docstring const & str,
 				space_inserted = true;
 			}
 		} else if (specialchars.find(ch) != specialchars.end()) {
-			par.insertInset(pos, new InsetSpecialChar(specialchars.find(ch)->second),
+			if (par.insertInset(pos, new InsetSpecialChar(specialchars.find(ch)->second),
 					font, bparams.track_changes ?
 						Change(Change::INSERTED)
-					      : Change(Change::UNCHANGED));
-			++pos;
+						  : Change(Change::UNCHANGED)))
+				++pos;
 			space_inserted = false;
 		} else if (!isPrintable(ch)) {
 			// Ignore (other) unprintables


More information about the lyx-cvs mailing list