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
index be5d8c5..3e88758 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -1689,13 +1689,21 @@
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