From ca11abda32b0f0ba907d6597f87094514543b399 Mon Sep 17 00:00:00 2001 From: Hiroshi Sumita Date: Thu, 22 Mar 2012 12:40:34 +0900 Subject: 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 --- src/PyZyPinyinContext.cc | 3 +++ 1 file changed, 3 insertions(+) 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 (); } } } -- cgit v1.2.1