From 0f184b6073c28275c967727bf1abf3e8d52b488d Mon Sep 17 00:00:00 2001 From: Peng Huang Date: Wed, 17 Mar 2010 19:33:08 +0800 Subject: [PATCH] Ignore all chars if preedit is too long. --- src/DoublePinyinEditor.cc | 2 +- src/FullPinyinEditor.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DoublePinyinEditor.cc b/src/DoublePinyinEditor.cc index a3e717e..b4a49e6 100644 --- a/src/DoublePinyinEditor.cc +++ b/src/DoublePinyinEditor.cc @@ -73,7 +73,7 @@ DoublePinyinEditor::insert (gint ch) gint id; /* is full */ if (G_UNLIKELY (m_text.length () >= MAX_PINYIN_LEN)) - return FALSE; + return TRUE; id = _id (ch); if (id == -1) { diff --git a/src/FullPinyinEditor.cc b/src/FullPinyinEditor.cc index a231daa..5f613d6 100644 --- a/src/FullPinyinEditor.cc +++ b/src/FullPinyinEditor.cc @@ -37,7 +37,7 @@ FullPinyinEditor::insert (gint ch) { /* is full */ if (G_UNLIKELY (m_text.length () >= MAX_PINYIN_LEN)) - return FALSE; + return TRUE; m_text.insert (m_cursor++, ch); -- 2.7.4