Skip to content

Commit 179f1b9

Browse files
committed
patch 7.4.1488
Problem: Not using key when result from hangul_string_convert() is NULL. Solution: Fall back to not converted string.
1 parent 328da0d commit 179f1b9

2 files changed

Lines changed: 13 additions & 11 deletions

File tree

src/ui.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,24 +1686,24 @@ add_to_input_buf_csi(char_u *str, int len)
16861686
push_raw_key(char_u *s, int len)
16871687
{
16881688
char_u *tmpbuf;
1689+
char_u *inp = s;
16891690

1691+
/* use the conversion result if possible */
16901692
tmpbuf = hangul_string_convert(s, &len);
16911693
if (tmpbuf != NULL)
1692-
{
1693-
s = tmpbuf;
1694+
inp = tmpbuf;
16941695

1695-
for (; len--; s++)
1696+
for (; len--; inp++)
1697+
{
1698+
inbuf[inbufcount++] = *inp;
1699+
if (*inp == CSI)
16961700
{
1697-
inbuf[inbufcount++] = *s;
1698-
if (*s == CSI)
1699-
{
1700-
/* Turn CSI into K_CSI. */
1701-
inbuf[inbufcount++] = KS_EXTRA;
1702-
inbuf[inbufcount++] = (int)KE_CSI;
1703-
}
1701+
/* Turn CSI into K_CSI. */
1702+
inbuf[inbufcount++] = KS_EXTRA;
1703+
inbuf[inbufcount++] = (int)KE_CSI;
17041704
}
1705-
vim_free(tmpbuf);
17061705
}
1706+
vim_free(tmpbuf);
17071707
}
17081708
#endif
17091709

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,8 @@ static char *(features[]) =
743743

744744
static int included_patches[] =
745745
{ /* Add new patch number below this line */
746+
/**/
747+
1488,
746748
/**/
747749
1487,
748750
/**/

0 commit comments

Comments
 (0)