diff options
author | Peng Wu <alexepico@gmail.com> | 2015-12-09 16:29:43 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2015-12-09 16:31:32 +0800 |
commit | 63ed6f0427742a0e6f50195aeca84380191b7bfb (patch) | |
tree | 00f700d44a0b938c5c9af81cd41a8191749e20f4 | |
parent | e94fe7e9209ce7bc53afb8095ea27a36d3293616 (diff) | |
download | ibus-libzhuyin-63ed6f0427742a0e6f50195aeca84380191b7bfb.tar.gz ibus-libzhuyin-63ed6f0427742a0e6f50195aeca84380191b7bfb.tar.xz ibus-libzhuyin-63ed6f0427742a0e6f50195aeca84380191b7bfb.zip |
fixes getCursorRight and selectCandidate method
-rw-r--r-- | src/ZYZPhoneticEditor.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ZYZPhoneticEditor.cc b/src/ZYZPhoneticEditor.cc index 62e9c59..0a76b0b 100644 --- a/src/ZYZPhoneticEditor.cc +++ b/src/ZYZPhoneticEditor.cc @@ -601,6 +601,9 @@ PhoneticEditor::selectCandidate (guint index) if (0 == offset) return FALSE; + if (!m_config.candidatesAfterCursor ()) + m_cursor --; + erase_input_sequence (m_text, m_cursor, 1); insert_symbol (m_text, m_cursor, symbols->getType (), symbols->getLookup (), symbols->getChoice ()); @@ -779,6 +782,11 @@ PhoneticEditor::getCursorRight (void) } } + /* near symbol section */ + if (SYMBOL_SECTION == type) { + return m_cursor + 1; + } + probe_section_start (enhanced_text, m_cursor + 1, cursor, index, start_pos); |