summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi Sumita <hsumita@google.com>2012-03-22 12:40:34 +0900
committerHiroshi Sumita <hsumita@google.com>2012-03-22 12:40:34 +0900
commitca11abda32b0f0ba907d6597f87094514543b399 (patch)
tree57345c65bc71d0d8cd560f10baf8e5b1272f2828
parent228c946461e19f53f136ca8325edf6c53225cbca (diff)
downloadpyzy-ca11abda32b0f0ba907d6597f87094514543b399.tar.gz
Fixes preedit text handlings.
BUG=All characters should be set on conversionText when cursor position is not at the end. TEST=Manually tested with client codes. Review URL: https://codereview.appspot.com/5869044
-rw-r--r--src/PyZyPinyinContext.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/PyZyPinyinContext.cc b/src/PyZyPinyinContext.cc
index ff9aec7..436915a 100644
--- a/src/PyZyPinyinContext.cc
+++ b/src/PyZyPinyinContext.cc
@@ -134,6 +134,9 @@ PinyinContext::updatePreeditText ()
}
m_buffer << '|' << textAfterPinyin (candidate_end);
m_preedit_text.rest_text = m_buffer;
+
+ edit_end_word = m_buffer.utf8Length ();
+ edit_end_byte = m_buffer.size ();
}
}
}