summaryrefslogtreecommitdiff
path: root/src/os_win32.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-11-28 18:07:59 +0100
committerBram Moolenaar <Bram@vim.org>2017-11-28 18:07:59 +0100
commit3660a10c73a6d716ae9fca21f7c5a3282ddc7c85 (patch)
tree7fe07871a36ce65812c2549e01115570c1c04877 /src/os_win32.c
parent1ed2276fd50f34e824eeae93d5a5ebfdf118be26 (diff)
downloadvim-git-3660a10c73a6d716ae9fca21f7c5a3282ddc7c85.tar.gz
patch 8.0.1354: Shift-Insert doesn't always work in MS-Windows consolev8.0.1354
Problem: Shift-Insert doesn't always work in MS-Windows console. Solution: Handle K_NUL differently. (Yasuhiro Matsumoto, closes #2381)
Diffstat (limited to 'src/os_win32.c')
-rw-r--r--src/os_win32.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/os_win32.c b/src/os_win32.c
index becbeeee2..c1c297a63 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -1817,9 +1817,18 @@ mch_inchar(
typeahead[typeaheadlen] = c;
if (ch2 != NUL)
{
- typeahead[typeaheadlen + n] = 3;
- typeahead[typeaheadlen + n + 1] = (char_u)ch2;
- n += 2;
+ if (c == K_NUL)
+ {
+ /* fAnsiKey */
+ typeahead[typeaheadlen + n] = (char_u)ch2;
+ n++;
+ }
+ else
+ {
+ typeahead[typeaheadlen + n] = 3;
+ typeahead[typeaheadlen + n + 1] = (char_u)ch2;
+ n += 2;
+ }
}
if (conv)