自動一覧ポップアップのカウタずれを修正。
1 parent cd0f9ed commit 10a1aa36cd99662f935638f3af12319608fcf245
@tamra tamra authored on 27 Nov 2004
Showing 1 changed file
View
11
scim-wnn/src/scim_wnn_imengine.cpp
if (!m_rk.getTextLength()) {
return(false);
}
startConversion(m_rk.getText(true));
alp_count ++;
show_preedit_string();
if (m_conversion) {
update_preedit_string(wnn.getText(),wnn.getAttributeList());
update_preedit_caret(wnn.getCaretPos());
\fn WnnInstance::process_conversion_key_event(const KeyEvent &key)
*/
bool WnnInstance::process_conversion_key_event(const KeyEvent &key)
{
if ((alp < alp_count) && (alp != 0)) {
if ((alp <= alp_count) && (alp != 0)) {
if (!m_lookup) startLookup();
}
 
if (k_lookup_popup.comp(key)) {
hide_preedit_string();
hide_lookup_table();
hide_aux_string();
m_lookup = false;
alp_count = 0;
alp_count = 1;
return(true);
} else
if (k_cancel.comp(key) || k_backspace.comp(key)) {
wnn.reset();
update_preedit_caret(wnn.getCaretPos());
hide_lookup_table();
hide_aux_string();
m_lookup = false;
alp_count = 0;
alp_count = 1;
return(true);
} else
if (k_conversion_forward.comp(key) || k_conversion_backward.comp(key)) {
k_conversion_backward.comp(key) ? wnn.setPos(wnn.getPos() - 1) : wnn.setPos(wnn.getPos() + 1);
update_preedit_caret(wnn.getCaretPos());
hide_lookup_table();
hide_aux_string();
m_lookup = false;
alp_count = 0;
alp_count = 1;
return(true);
} else
if (isprint(key.code)) {
if (key.mask & (SCIM_KEY_AltMask | SCIM_KEY_ControlMask)) return(false);
}
m_convList = wnn.getConversionList();
m_conversion = true;
 
alp_count = 0;
alp_count = 1;
}
 
 
/*!