diff options
author | Peng Wu <alexepico@gmail.com> | 2017-12-08 10:49:56 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2017-12-08 10:49:56 +0800 |
commit | 0a050d2be708319c2d52d33e626f3a06aa49f001 (patch) | |
tree | d9a026cfa470bd39bebd16da854ce30e3849aa8c | |
parent | da65cc785bfb9b57180142e890480559845fbd86 (diff) | |
download | ibus-libzhuyin-0a050d2be708319c2d52d33e626f3a06aa49f001.tar.gz ibus-libzhuyin-0a050d2be708319c2d52d33e626f3a06aa49f001.tar.xz ibus-libzhuyin-0a050d2be708319c2d52d33e626f3a06aa49f001.zip |
fixes getCursorLeft method
-rw-r--r-- | src/ZYZPhoneticEditor.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ZYZPhoneticEditor.cc b/src/ZYZPhoneticEditor.cc index 0c1ffa9..32a0f0a 100644 --- a/src/ZYZPhoneticEditor.cc +++ b/src/ZYZPhoneticEditor.cc @@ -705,6 +705,10 @@ PhoneticEditor::getCursorLeft (void) size_t offset = 0; zhuyin_get_zhuyin_offset (instance, cursor, &offset); + /* cursor moved already */ + if (cursor != offset) + return m_cursor - (cursor + 1) + offset; + size_t left = 0; zhuyin_get_left_zhuyin_offset(instance, offset, &left); |