[LyX/master] Fix correction with continuous spellcheck

Scott Kostyshak skostysh at lyx.org
Fri Mar 13 02:16:12 UTC 2020


commit 2b8675105727e73b83a59c38adc8f95a17f14b05
Author: Scott Kostyshak <skostysh at lyx.org>
Date:   Thu Mar 12 21:50:54 2020 -0400

    Fix correction with continuous spellcheck
    
    This commit amends 8d26ae57ba66b4518985cf3430de2dcf37096568.
---
 src/CutAndPaste.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp
index 0e620aa..2a08444 100644
--- a/src/CutAndPaste.cpp
+++ b/src/CutAndPaste.cpp
@@ -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);


More information about the lyx-cvs mailing list