# HG changeset patch # User Christian Brabandt # Date 1457002809 -3600 # Node ID 6099e81850457aff207e57f546da5dc81c3ee5d6 # Parent b4a5b39087452dcdad2057e0570d84da3b5b5f93 commit https://github.com/vim/vim/commit/00ded43a5a85df57abb74f9e3a38a401f6fbd8fd Author: Bram Moolenaar Date: Thu Mar 3 11:45:15 2016 +0100 patch 7.4.1475 Problem: When using hangulinput with utf-8 a CSI character is misintepreted. Solution: Convert CSI to K_CSI. (SungHyun Nam) diff --git a/src/ui.c b/src/ui.c --- 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 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 */ /**/ + 1475, +/**/ 1474, /**/ 1473,