# HG changeset patch # User Christian Brabandt # Date 1457128804 -3600 # Node ID a7f94f0ba183998ece1ac430a00329589e1a91bd # Parent 1bf1b88968a2e825528db4bc491a531e27af5205 commit https://github.com/vim/vim/commit/179f1b9a7ddf3624daf6380c3dad740e0a1ba361 Author: Bram Moolenaar Date: Fri Mar 4 22:52:34 2016 +0100 patch 7.4.1488 Problem: Not using key when result from hangul_string_convert() is NULL. Solution: Fall back to not converted string. diff --git a/src/ui.c b/src/ui.c --- a/src/ui.c +++ b/src/ui.c @@ -1686,24 +1686,24 @@ add_to_input_buf_csi(char_u *str, int le 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) + inp = tmpbuf; + + for (; len--; inp++) { - s = tmpbuf; - - for (; len--; s++) + 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 diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -744,6 +744,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1488, +/**/ 1487, /**/ 1486,