]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 7.4.1475 v7.4.1475
authorBram Moolenaar <Bram@vim.org>
Thu, 3 Mar 2016 10:45:15 +0000 (11:45 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 3 Mar 2016 10:45:15 +0000 (11:45 +0100)
Problem:    When using hangulinput with utf-8 a CSI character is
            misintepreted.
Solution:   Convert CSI to K_CSI. (SungHyun Nam)

src/ui.c
src/version.c

index be5d8c50fbd263aa8046a60683394ce9eda20105..3e887585100a0a491b3cc6669394d29095b13b83 100644 (file)
--- a/src/ui.c
+++ b/src/ui.c
@@ -1689,13 +1689,21 @@ push_raw_key(char_u *s, int len)
 
     tmpbuf = hangul_string_convert(s, &len);
     if (tmpbuf != NULL)
+    {
        s = tmpbuf;
 
-    while (len--)
-       inbuf[inbufcount++] = *s++;
-
-    if (tmpbuf != NULL)
+       for (; len--; s++)
+       {
+           inbuf[inbufcount++] = *s;
+           if (*s == CSI)
+           {
+               /* Turn CSI into K_CSI. */
+               inbuf[inbufcount++] = KS_EXTRA;
+               inbuf[inbufcount++] = (int)KE_CSI;
+           }
+       }
        vim_free(tmpbuf);
+    }
 }
 #endif
 
index de168020ad4c03d74cf9fa2a4902296d296b9bb1..3491a4bad4e52660b81680f3955854df5ebc6bc5 100644 (file)
@@ -743,6 +743,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1475,
 /**/
     1474,
 /**/