Mercurial > vim
changeset 8366:6099e8185045 v7.4.1475
commit https://github.com/vim/vim/commit/00ded43a5a85df57abb74f9e3a38a401f6fbd8fd
Author: Bram Moolenaar <Bram@vim.org>
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 03 Mar 2016 12:00:09 +0100 |
parents | b4a5b3908745 |
children | baaed20fea62 |
files | src/ui.c src/version.c |
diffstat | 2 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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