diff options
-rw-r--r-- | src/PYEnglishEditor.cc | 5 | ||||
-rw-r--r-- | src/PYStrokeEditor.cc | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/PYEnglishEditor.cc b/src/PYEnglishEditor.cc index 333ea96..8d58e0f 100644 --- a/src/PYEnglishEditor.cc +++ b/src/PYEnglishEditor.cc @@ -533,10 +533,9 @@ EnglishEditor::processEnter (guint keyval) if (m_text.length () == 0) return FALSE; - String preedit = m_text.substr (1); - Text text (preedit); + Text text(m_text); commitText (text); - train (preedit.c_str (), m_train_factor); + train (m_text.c_str (), m_train_factor); reset (); return TRUE; } diff --git a/src/PYStrokeEditor.cc b/src/PYStrokeEditor.cc index 252dddd..20bc84f 100644 --- a/src/PYStrokeEditor.cc +++ b/src/PYStrokeEditor.cc @@ -310,8 +310,7 @@ StrokeEditor::processEnter (guint keyval) if (m_text.length () == 0) return FALSE; - String preedit = m_text.substr (1); - Text text (preedit); + Text text(m_text); commitText (text); reset (); return TRUE; |