Skip to content

Commit a45ff6c

Browse files
committed
patch 8.0.1355: cursor keys don't work in MS-Windows console
Problem: Cursor keys don't work in MS-Windows console. Solution: Revert the previous patch. Also delete dead code.
1 parent 3660a10 commit a45ff6c

2 files changed

Lines changed: 5 additions & 35 deletions

File tree

src/os_win32.c

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1789,7 +1789,6 @@ mch_inchar(
17891789
#endif
17901790
{
17911791
int n = 1;
1792-
int conv = FALSE;
17931792

17941793
#ifdef FEAT_MBYTE
17951794
if (ch2 == NUL)
@@ -1817,40 +1816,9 @@ mch_inchar(
18171816
typeahead[typeaheadlen] = c;
18181817
if (ch2 != NUL)
18191818
{
1820-
if (c == K_NUL)
1821-
{
1822-
/* fAnsiKey */
1823-
typeahead[typeaheadlen + n] = (char_u)ch2;
1824-
n++;
1825-
}
1826-
else
1827-
{
1828-
typeahead[typeaheadlen + n] = 3;
1829-
typeahead[typeaheadlen + n + 1] = (char_u)ch2;
1830-
n += 2;
1831-
}
1832-
}
1833-
1834-
if (conv)
1835-
{
1836-
char_u *p = typeahead + typeaheadlen;
1837-
1838-
if (*p != K_NUL)
1839-
{
1840-
char_u *e = typeahead + TYPEAHEADLEN;
1841-
1842-
while (*p && p < e)
1843-
{
1844-
if (*p == K_NUL)
1845-
{
1846-
++p;
1847-
mch_memmove(p + 1, p, ((size_t)(e - p)) - 1);
1848-
*p = 3;
1849-
++n;
1850-
}
1851-
++p;
1852-
}
1853-
}
1819+
typeahead[typeaheadlen + n] = 3;
1820+
typeahead[typeaheadlen + n + 1] = (char_u)ch2;
1821+
n += 2;
18541822
}
18551823

18561824
/* Use the ALT key to set the 8th bit of the character

src/version.c

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

772772
static int included_patches[] =
773773
{ /* Add new patch number below this line */
774+
/**/
775+
1355,
774776
/**/
775777
1354,
776778
/**/

0 commit comments

Comments
 (0)