]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 7.4.1488 v7.4.1488
authorBram Moolenaar <Bram@vim.org>
Fri, 4 Mar 2016 21:52:34 +0000 (22:52 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 4 Mar 2016 21:52:34 +0000 (22:52 +0100)
Problem:    Not using key when result from hangul_string_convert() is NULL.
Solution:   Fall back to not converted string.

src/ui.c
src/version.c

index 3e887585100a0a491b3cc6669394d29095b13b83..875be1b30003d093b156982142a8049e7c23b36b 100644 (file)
--- a/src/ui.c
+++ b/src/ui.c
@@ -1686,24 +1686,24 @@ add_to_input_buf_csi(char_u *str, int len)
 push_raw_key(char_u *s, int len)
 {
     char_u *tmpbuf;
+    char_u *inp = s;
 
+    /* use the conversion result if possible */
     tmpbuf = hangul_string_convert(s, &len);
     if (tmpbuf != NULL)
-    {
-       s = tmpbuf;
+       inp = tmpbuf;
 
-       for (; len--; s++)
+    for (; len--; inp++)
+    {
+       inbuf[inbufcount++] = *inp;
+       if (*inp == CSI)
        {
-           inbuf[inbufcount++] = *s;
-           if (*s == CSI)
-           {
-               /* Turn CSI into K_CSI. */
-               inbuf[inbufcount++] = KS_EXTRA;
-               inbuf[inbufcount++] = (int)KE_CSI;
-           }
+           /* Turn CSI into K_CSI. */
+           inbuf[inbufcount++] = KS_EXTRA;
+           inbuf[inbufcount++] = (int)KE_CSI;
        }
-       vim_free(tmpbuf);
     }
+    vim_free(tmpbuf);
 }
 #endif
 
index 3623a099f8bbce02cdd5cb2bfefdb391407ec120..17fd8883c2022106d24c980e503c1e7bf6ea0992 100644 (file)
@@ -743,6 +743,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1488,
 /**/
     1487,
 /**/