comparison src/ui.c @ 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 74b15ed0a259
children a7f94f0ba183
comparison
equal deleted inserted replaced
8365:b4a5b3908745 8366:6099e8185045
1687 { 1687 {
1688 char_u *tmpbuf; 1688 char_u *tmpbuf;
1689 1689
1690 tmpbuf = hangul_string_convert(s, &len); 1690 tmpbuf = hangul_string_convert(s, &len);
1691 if (tmpbuf != NULL) 1691 if (tmpbuf != NULL)
1692 {
1692 s = tmpbuf; 1693 s = tmpbuf;
1693 1694
1694 while (len--) 1695 for (; len--; s++)
1695 inbuf[inbufcount++] = *s++; 1696 {
1696 1697 inbuf[inbufcount++] = *s;
1697 if (tmpbuf != NULL) 1698 if (*s == CSI)
1699 {
1700 /* Turn CSI into K_CSI. */
1701 inbuf[inbufcount++] = KS_EXTRA;
1702 inbuf[inbufcount++] = (int)KE_CSI;
1703 }
1704 }
1698 vim_free(tmpbuf); 1705 vim_free(tmpbuf);
1706 }
1699 } 1707 }
1700 #endif 1708 #endif
1701 1709
1702 /* Remove everything from the input buffer. Called when ^C is found */ 1710 /* Remove everything from the input buffer. Called when ^C is found */
1703 void 1711 void