diff options
Diffstat (limited to 'src/PYPPhoneticEditor.cc')
-rw-r--r-- | src/PYPPhoneticEditor.cc | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/PYPPhoneticEditor.cc b/src/PYPPhoneticEditor.cc index 517bac4..0ef11d7 100644 --- a/src/PYPPhoneticEditor.cc +++ b/src/PYPPhoneticEditor.cc @@ -365,15 +365,8 @@ PhoneticEditor::getLookupCursor (void) { guint lookup_cursor = getPinyinCursor (); - /* as pinyin_get_pinyin_offset can't handle the last "'" characters, - strip the string to work around it here. */ - String stripped = m_text; - size_t pos = stripped.find_last_not_of ("'") + 1; - if (pos < stripped.length ()) - stripped.erase (pos); - /* show candidates when pinyin cursor is at end. */ - if (lookup_cursor == stripped.length ()) + if (lookup_cursor == m_text.length ()) lookup_cursor = 0; return lookup_cursor; } |