diff src/misc2.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 8f4cc259ed7a
children a1396a35444c
line wrap: on
line diff
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -4601,3 +4601,22 @@ build_argv_from_list(list_T *l, char ***
 }
 # endif
 #endif
+
+/*
+ * Change the behavior of vterm.
+ * 0: As usual.
+ * 1: Windows 10 version 1809
+ *      The bug causes unstable handling of ambiguous width character.
+ * 2: Windows 10 version 1903
+ *      Use the wrong result because each result is different.
+ * 3: Windows 10 insider preview (current latest logic)
+ */
+    int
+get_special_pty_type(void)
+{
+#ifdef MSWIN
+    return get_conpty_type();
+#else
+    return 0;
+#endif
+}