Skip to content

Commit

Permalink
patch 8.0.1355: cursor keys don't work in MS-Windows console
Browse files Browse the repository at this point in the history
Problem:    Cursor keys don't work in MS-Windows console.
Solution:   Revert the previous patch.  Also delete dead code.
  • Loading branch information
brammool committed Nov 28, 2017
1 parent 3660a10 commit a45ff6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 35 deletions.
38 changes: 3 additions & 35 deletions src/os_win32.c
Expand Up @@ -1789,7 +1789,6 @@ mch_inchar(
#endif #endif
{ {
int n = 1; int n = 1;
int conv = FALSE;


#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
if (ch2 == NUL) if (ch2 == NUL)
Expand Down Expand Up @@ -1817,40 +1816,9 @@ mch_inchar(
typeahead[typeaheadlen] = c; typeahead[typeaheadlen] = c;
if (ch2 != NUL) if (ch2 != NUL)
{ {
if (c == K_NUL) typeahead[typeaheadlen + n] = 3;
{ typeahead[typeaheadlen + n + 1] = (char_u)ch2;
/* fAnsiKey */ n += 2;
typeahead[typeaheadlen + n] = (char_u)ch2;
n++;
}
else
{
typeahead[typeaheadlen + n] = 3;
typeahead[typeaheadlen + n + 1] = (char_u)ch2;
n += 2;
}
}

if (conv)
{
char_u *p = typeahead + typeaheadlen;

if (*p != K_NUL)
{
char_u *e = typeahead + TYPEAHEADLEN;

while (*p && p < e)
{
if (*p == K_NUL)
{
++p;
mch_memmove(p + 1, p, ((size_t)(e - p)) - 1);
*p = 3;
++n;
}
++p;
}
}
} }


/* Use the ALT key to set the 8th bit of the character /* Use the ALT key to set the 8th bit of the character
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -771,6 +771,8 @@ static char *(features[]) =


static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1355,
/**/ /**/
1354, 1354,
/**/ /**/
Expand Down

0 comments on commit a45ff6c

Please sign in to comment.