From 0549d0c0bc2963caa78f11fce65833030a3cfacb Mon Sep 17 00:00:00 2001 From: johnsonj Date: Mon, 24 Aug 2015 09:15:39 +1000 Subject: Simplify filling virtual space and avoid any side effects that may be caused by calling AddCharUTF. --- src/Editor.cxx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index ca87b1319..3efd279df 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1949,10 +1949,15 @@ void Editor::AddCharUTF(const char *s, unsigned int len, bool treatAsDBCS) { } void Editor::FillVirtualSpace() { - const bool tmpOverstrike = inOverstrike; - inOverstrike = false; // not allow to be deleted twice. - AddCharUTF("", 0); - inOverstrike = tmpOverstrike; + // Make positions for the first composition string. + for (size_t r=0; r