Mercurial > vim
comparison src/os_win32.c @ 18064:8b4f9be5db73 v8.1.2027
patch 8.1.2027: MS-Windows: problem with ambiwidth characters
Commit: https://github.com/vim/vim/commit/57da69816872d53038e8a7e8dd4dc39a31192f0d
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Sep 13 22:30:11 2019 +0200
patch 8.1.2027: MS-Windows: problem with ambiwidth characters
Problem: MS-Windows: problem with ambiwidth characters.
Solution: handle ambiguous width characters in ConPTY on Windows 10 (1903).
(Nobuhiro Takasaki, closes #4411)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 13 Sep 2019 22:45:04 +0200 |
parents | 9544335db006 |
children | d683b2c82c00 |
comparison
equal
deleted
inserted
replaced
18063:168f1eca04a2 | 18064:8b4f9be5db73 |
---|---|
184 static int win32_getattrs(char_u *name); | 184 static int win32_getattrs(char_u *name); |
185 static int win32_setattrs(char_u *name, int attrs); | 185 static int win32_setattrs(char_u *name, int attrs); |
186 static int win32_set_archive(char_u *name); | 186 static int win32_set_archive(char_u *name); |
187 | 187 |
188 static int conpty_working = 0; | 188 static int conpty_working = 0; |
189 static int conpty_type = 0; | |
189 static int conpty_stable = 0; | 190 static int conpty_stable = 0; |
190 static void vtp_flag_init(); | 191 static void vtp_flag_init(); |
191 | 192 |
192 #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL) | 193 #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL) |
193 static int vtp_working = 0; | 194 static int vtp_working = 0; |
7247 */ | 7248 */ |
7248 #define VTP_FIRST_SUPPORT_BUILD MAKE_VER(10, 0, 15063) | 7249 #define VTP_FIRST_SUPPORT_BUILD MAKE_VER(10, 0, 15063) |
7249 | 7250 |
7250 /* | 7251 /* |
7251 * Support for pseudo-console (ConPTY) was added in windows 10 | 7252 * Support for pseudo-console (ConPTY) was added in windows 10 |
7252 * version 1809 (October 2018 update). However, that version is unstable. | 7253 * version 1809 (October 2018 update). |
7253 */ | 7254 */ |
7254 #define CONPTY_FIRST_SUPPORT_BUILD MAKE_VER(10, 0, 17763) | 7255 #define CONPTY_FIRST_SUPPORT_BUILD MAKE_VER(10, 0, 17763) |
7256 | |
7257 /* | |
7258 * ConPTY differences between versions, need different logic. | |
7259 * version 1903 (May 2019 update). | |
7260 */ | |
7261 #define CONPTY_1903_BUILD MAKE_VER(10, 0, 18362) | |
7262 | |
7263 /* | |
7264 * Confirm until this version. Also the logic changes. | |
7265 * insider preview. | |
7266 */ | |
7267 #define CONPTY_INSIDER_BUILD MAKE_VER(10, 0, 18898) | |
7268 | |
7269 /* | |
7270 * Not stable now. | |
7271 */ | |
7255 #define CONPTY_STABLE_BUILD MAKE_VER(10, 0, 32767) // T.B.D. | 7272 #define CONPTY_STABLE_BUILD MAKE_VER(10, 0, 32767) // T.B.D. |
7256 | 7273 |
7257 static void | 7274 static void |
7258 vtp_flag_init(void) | 7275 vtp_flag_init(void) |
7259 { | 7276 { |
7279 if (ver >= CONPTY_FIRST_SUPPORT_BUILD) | 7296 if (ver >= CONPTY_FIRST_SUPPORT_BUILD) |
7280 conpty_working = 1; | 7297 conpty_working = 1; |
7281 if (ver >= CONPTY_STABLE_BUILD) | 7298 if (ver >= CONPTY_STABLE_BUILD) |
7282 conpty_stable = 1; | 7299 conpty_stable = 1; |
7283 | 7300 |
7301 if (ver <= CONPTY_INSIDER_BUILD) | |
7302 conpty_type = 3; | |
7303 if (ver <= CONPTY_1903_BUILD) | |
7304 conpty_type = 2; | |
7305 if (ver < CONPTY_FIRST_SUPPORT_BUILD) | |
7306 conpty_type = 1; | |
7284 } | 7307 } |
7285 | 7308 |
7286 #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL) || defined(PROTO) | 7309 #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL) || defined(PROTO) |
7287 | 7310 |
7288 static void | 7311 static void |
7501 { | 7524 { |
7502 return conpty_working; | 7525 return conpty_working; |
7503 } | 7526 } |
7504 | 7527 |
7505 int | 7528 int |
7529 get_conpty_type(void) | |
7530 { | |
7531 return conpty_type; | |
7532 } | |
7533 | |
7534 int | |
7506 is_conpty_stable(void) | 7535 is_conpty_stable(void) |
7507 { | 7536 { |
7508 return conpty_stable; | 7537 return conpty_stable; |
7509 } | 7538 } |
7510 | 7539 |