Skip to content

Commit 3660a10

Browse files
committed
patch 8.0.1354: Shift-Insert doesn't always work in MS-Windows console
Problem: Shift-Insert doesn't always work in MS-Windows console. Solution: Handle K_NUL differently. (Yasuhiro Matsumoto, closes #2381)
1 parent 1ed2276 commit 3660a10

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

src/os_win32.c

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1817,9 +1817,18 @@ mch_inchar(
18171817
typeahead[typeaheadlen] = c;
18181818
if (ch2 != NUL)
18191819
{
1820-
typeahead[typeaheadlen + n] = 3;
1821-
typeahead[typeaheadlen + n + 1] = (char_u)ch2;
1822-
n += 2;
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+
}
18231832
}
18241833

18251834
if (conv)

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+
1354,
774776
/**/
775777
1353,
776778
/**/

0 commit comments

Comments
 (0)