Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 36931405
en ru br
Репозитории ALT
S:1.4.18-alt1
5.1: 1.4.9-alt1
4.1: 1.4.7-alt1
4.0: 1.4.4-alt3
www.altlinux.org/Changes

Группа :: Система/Настройка/Прочее
Пакет: scim

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: rawcode-unicode-maxlength.patch
Скачать


Index: modules/IMEngine/scim_rawcode_imengine.cpp
===================================================================
RCS file: /cvsroot/scim/scim/modules/IMEngine/scim_rawcode_imengine.cpp,v
retrieving revision 1.7.2.5
retrieving revision 1.7.2.6
diff -u -r1.7.2.5 -r1.7.2.6
--- modules/IMEngine/scim_rawcode_imengine.cpp	12 Jan 2006 07:00:36 -0000	1.7.2.5
+++ modules/IMEngine/scim_rawcode_imengine.cpp	18 Jan 2006 05:44:52 -0000	1.7.2.6
@@ -23,7 +23,7 @@
  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  * Boston, MA  02111-1307  USA
  *
- * $Id: scim_rawcode_imengine.cpp,v 1.7.2.5 2006/01/12 07:00:36 suzhe Exp $
+ * $Id: scim_rawcode_imengine.cpp,v 1.7.2.6 2006/01/18 05:44:52 suzhe Exp $
  *
  */
 
@@ -430,9 +430,20 @@
     }
 
     if (m_unicode) {
-        if (m_preedit_string.length () >= 3 && m_preedit_string.length () < 6 && create_lookup_table () > 0) {
+        size_t maxlen = 6;
+
+        if (m_preedit_string.length () > 0) {
+            if (m_preedit_string [0] == '0')
+                maxlen = 4;
+            else if (m_preedit_string [0] == '1')
+                maxlen = 6;
+            else
+                maxlen = 5;
+        }
+
+        if (m_preedit_string.length () >= 3 && m_preedit_string.length () < maxlen && create_lookup_table () > 0) {
             update_lookup_table (m_lookup_table);
-        } else if (m_preedit_string.length () == 6) {
+        } else if (m_preedit_string.length () == maxlen) {
             WideString str;
             ucs4_t code = get_unicode_value (m_preedit_string);
 
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin