supertanglang / scim-googlepinyin

Automatically exported from code.google.com/p/scim-googlepinyin
1 stars 0 forks source link

翻页后按空格键选词不正确 #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. 输入一串字符
2. 按“+”在候选列表翻页
3. 按空格选择

What is the expected output? What do you see instead?
本应该选中第二页的第一个词,但打出来的,依然是第一页��
�第一个词

What version of the product are you using? On what operating system?
最新的

Please provide any additional information below.

Original issue reported on code.google.com by gracegre...@gmail.com on 28 Oct 2009 at 4:31

GoogleCodeExporter commented 9 years ago
This is my patch, which is already tested.
Index: src/pinyin_ime.cpp
===================================================================
--- src/pinyin_ime.cpp  (revision 50)
+++ src/pinyin_ime.cpp  (working copy)
@@ -218,7 +218,8 @@
         reset_to_idle_state();
         return true;
     } else if (key.code == SCIM_KEY_space) {
-        choose_candidate(-1);
+   int active_pos = m_cand_view->get_active_candidate_pos();
+        choose_candidate_in_page(active_pos);
         return true;
     } else if ((ch >= 'a' && ch <= 'z') ||
                (ch == '\'' && !m_dec_info->char_before_cursor_is_separator()) ||
@@ -266,7 +267,8 @@
         reset_to_idle_state();
         return true;
     } else if (key.code == SCIM_KEY_space) {
-        choose_candidate(-1);
+   int active_pos = m_cand_view->get_active_candidate_pos();
+        choose_candidate_in_page(active_pos);
         return true;
     }
     return true;

Original comment by firstfan on 11 Dec 2009 at 1:44

GoogleCodeExporter commented 9 years ago
thanks gracegreener and firstfan!

i fixed it in another way to keep it aligned with the original java code. =)

@grace

thanks a lot for reporting the bugs with detailed information, and in both 
Chinese
and English! =)

I can read in both of them. If you will report more bugs, maybe you can simply 
post
it in one language. =)

Original comment by tchai...@gmail.com on 21 Dec 2009 at 4:34