From 5a9fa844efd42522eb5739f3ba12913ab80437a5 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Tue, 4 Aug 2015 14:17:01 +0800 Subject: add candidates after cursor option --- src/ZYZPhoneticSection.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/ZYZPhoneticSection.cc') diff --git a/src/ZYZPhoneticSection.cc b/src/ZYZPhoneticSection.cc index 99d6213..f8bfe7d 100644 --- a/src/ZYZPhoneticSection.cc +++ b/src/ZYZPhoneticSection.cc @@ -21,6 +21,7 @@ #include "ZYZPhoneticSection.h" #include +#include "ZYConfig.h" #include "ZYZhuyinProperties.h" #include "ZYTradSimpConverter.h" @@ -47,7 +48,10 @@ PhoneticSection::initCandidates (zhuyin_instance_t * instance, zhuyin_get_zhuyin_key_rest_offset (instance, cursor, &offset); - zhuyin_guess_candidates (m_instance, offset); + if (m_editor.m_config.candidatesAfterCursor ()) + zhuyin_guess_candidates_after_cursor (m_instance, offset); + else + zhuyin_guess_candidates_before_cursor (m_instance, offset); return true; } -- cgit