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)
diff --git a/src/misc2.c b/src/misc2.c
index e0df7c8..0d6c514 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -4601,3 +4601,22 @@
}
# 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
+}