improve t9ext

This commit is contained in:
lixianjing 2021-12-27 17:34:18 +08:00
parent 4e16c608ea
commit ff7ca9621e
3 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,9 @@
# 最新动态
2021/12/27
* 修复T9Ext输入法输入1后删除1但是候选栏没有关闭的问题。
2021/12/24
* 修复mingw编译说明文档感谢智明提供补丁
* 修复SDL释放的时候内存泄露的问题感谢智明提供补丁

View File

@ -43,8 +43,10 @@ static ret_t input_engine_spinyin_search(input_engine_t* engine, const char* key
uint32_t items_nr = ARRAY_SIZE(s_pinyin_chinese_items);
input_engine_reset_candidates(engine);
if (keys_size < 1) {
if (keys_size == 0) {
input_engine_reset_input(engine);
input_engine_dispatch_candidates(engine, 0);
return RET_OK;
}

View File

@ -283,7 +283,6 @@ static ret_t input_engine_t9ext_search(input_engine_t* engine, const char* keys)
t9->pre_candidates_nr = 1;
wbuffer_rewind(&(t9->pre_candidates));
wbuffer_write_string(&(t9->pre_candidates), keys);
input_engine_reset_input(engine);
input_method_dispatch_pre_candidates(engine->im, (const char*)(t9->pre_candidates.data),
t9->pre_candidates_nr, 0);