summaryrefslogtreecommitdiffstats
path: root/src/ZYZPhoneticEditor.cc
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2017-12-12 12:08:29 +0800
committerPeng Wu <alexepico@gmail.com>2017-12-12 12:08:29 +0800
commitf8696d258fffc272ee59f49315807c26b44d8658 (patch)
treee186cedab68d9f59f15e01f55118a9fa2c099735 /src/ZYZPhoneticEditor.cc
parent0a050d2be708319c2d52d33e626f3a06aa49f001 (diff)
downloadibus-libzhuyin-f8696d258fffc272ee59f49315807c26b44d8658.tar.gz
ibus-libzhuyin-f8696d258fffc272ee59f49315807c26b44d8658.tar.xz
ibus-libzhuyin-f8696d258fffc272ee59f49315807c26b44d8658.zip
clean getCursorLeft method
Diffstat (limited to 'src/ZYZPhoneticEditor.cc')
-rw-r--r--src/ZYZPhoneticEditor.cc9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/ZYZPhoneticEditor.cc b/src/ZYZPhoneticEditor.cc
index 32a0f0a..b4001f6 100644
--- a/src/ZYZPhoneticEditor.cc
+++ b/src/ZYZPhoneticEditor.cc
@@ -705,16 +705,9 @@ 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);
-
/* align to the begin of chewing key. */
/* restore cursor variable. */
- return m_cursor - (cursor + 1) + left;
+ return m_cursor - (cursor + 1) + offset;
}
}