]> git.lyx.org Git - features.git/commitdiff
Fix #12104
authorRichard Kimberly Heck <rikiheck@lyx.org>
Tue, 2 Feb 2021 22:23:00 +0000 (17:23 -0500)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Tue, 2 Feb 2021 22:23:00 +0000 (17:23 -0500)
src/Text.cpp

index 19b3af5b28b2a272a1f50726f5a57313346893eb..b00f10de0c72edf95851c1a93db0093044345d9f 100644 (file)
@@ -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