]> git.lyx.org Git - features.git/commitdiff
Fix correction with continuous spellcheck
authorScott Kostyshak <skostysh@lyx.org>
Fri, 13 Mar 2020 01:50:54 +0000 (21:50 -0400)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:53 +0000 (15:48 +0200)
This commit amends 8d26ae57ba66b4518985cf3430de2dcf37096568.

src/CutAndPaste.cpp

index 0e620aab8ace717858849652b242a27c9475145d..2a08444728a3e7b7087489484510b41c9b5cb4ae 100644 (file)
@@ -1364,8 +1364,10 @@ void replaceSelectionWithString(Cursor & cur, docstring const & str)
        // Insert the new string
        pos_type pos = cur.selEnd().pos();
        Paragraph & par = cur.selEnd().paragraph();
-       for (auto const & c : str)
+       for (auto const & c : str) {
                par.insertChar(pos, c, font, cur.buffer()->params().track_changes);
+               ++pos;
+       }
 
        // Cut the selection
        cutSelection(cur, false);