diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-05-04 20:00:00 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-05-04 20:00:00 +0200 |
commit | ed5ab2a95972b5ef588bdafab9f197e1dcf0c1df (patch) | |
tree | 4917d434b728bd0baffbd8e73a6d0ab5708b1944 /src/getchar.c | |
parent | 510671a055c2d7a329c88bf133ac302139fd3221 (diff) |
patch 8.1.1269: MS-Windows GUI: multibyte chars with a 0x80 byte do not workv8.1.1269
Problem: MS-Windows GUI: multibyte chars with a 0x80 byte do not work when
compiled with VIMDLL.
Solution: Adjust the condition for fixing the input buffer. (Ken Takata,
closes #4330)
Diffstat (limited to 'src/getchar.c')
-rw-r--r-- | src/getchar.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/getchar.c b/src/getchar.c index 776e4e6841..6a4c60f067 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -3095,7 +3095,7 @@ inchar( /* * Fix typed characters for use by vgetc() and check_termcode(). - * buf[] must have room to triple the number of bytes! + * "buf[]" must have room to triple the number of bytes! * Returns the new length. */ int @@ -3135,14 +3135,15 @@ fix_input_buffer(char_u *buf, int len) else #endif if (p[0] == NUL || (p[0] == K_SPECIAL - /* timeout may generate K_CURSORHOLD */ + // timeout may generate K_CURSORHOLD && (i < 2 || p[1] != KS_EXTRA || p[2] != (int)KE_CURSORHOLD) #if defined(MSWIN) && (!defined(FEAT_GUI) || defined(VIMDLL)) + // Win32 console passes modifiers + && ( # ifdef VIMDLL - && !gui.in_use + gui.in_use || # endif - /* Win32 console passes modifiers */ - && (i < 2 || p[1] != KS_MODIFIER) + (i < 2 || p[1] != KS_MODIFIER)) #endif )) { @@ -3154,7 +3155,7 @@ fix_input_buffer(char_u *buf, int len) len += 2; } } - *p = NUL; /* add trailing NUL */ + *p = NUL; // add trailing NUL return len; } |