diff options
author | Peng Wu <alexepico@gmail.com> | 2010-06-22 18:08:00 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2010-06-22 18:08:00 +0800 |
commit | 83a549ad0dd6872fcea509df02666b5cb6488324 (patch) | |
tree | 592e5b174b09d7ba0dae5579c8b831b75b440fa3 /src | |
parent | 263e1ae756cb07e0c95417e78e478bfa21c05a30 (diff) | |
download | ibus-pinyin-83a549ad0dd6872fcea509df02666b5cb6488324.tar.gz |
fixes space and m_cursor handles.
Diffstat (limited to 'src')
-rw-r--r-- | src/ExtEditor.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ExtEditor.cc b/src/ExtEditor.cc index fd7dad3..91e4994 100644 --- a/src/ExtEditor.cc +++ b/src/ExtEditor.cc @@ -269,11 +269,11 @@ ExtEditor::processSpace (guint keyval) case LABEL_LIST_COMMANDS: case LABEL_LIST_DIGIT: case LABEL_LIST_ALPHA: - selectCandidateInPage (cursor_pos); + selectCandidate (cursor_pos); break; case LABEL_LIST_SINGLE: g_return_val_if_fail (cursor_pos == 0 , FALSE); - selectCandidateInPage (cursor_pos); + selectCandidate (cursor_pos); break; default: break; @@ -421,6 +421,7 @@ ExtEditor::selectCandidate (guint index) m_text.clear (); m_text = "i"; m_text += command->command_name; + m_cursor = m_text.length (); break; } } @@ -442,6 +443,7 @@ ExtEditor::selectCandidate (guint index) m_text.clear (); } else if (candidate->suggest) { m_text += candidate->suggest; + m_cursor += strlen(candidate->suggest); } updateStateFromInput (); |