patch 8.2.0656: MS-Windows: redrawing right screen edge may not be needed
Problem: MS-Windows: redrawing right screen edge may not be needed.
Solution: Check the build version. (Nobuhiro Takasaki, closes #6002)
diff --git a/src/drawscreen.c b/src/drawscreen.c
index be4d6aa..faecaa4 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -2439,7 +2439,8 @@
#ifdef FEAT_VTP
// Rewrite the character at the end of the screen line.
- if (use_vtp())
+ // See the version that was fixed.
+ if (use_vtp() && get_conpty_fix_type() < 1)
{
int i;
diff --git a/src/os_win32.c b/src/os_win32.c
index 85efc52..e4d8135 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -188,6 +188,7 @@
static int conpty_working = 0;
static int conpty_type = 0;
static int conpty_stable = 0;
+static int conpty_fix_type = 0;
static void vtp_flag_init();
#if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
@@ -7289,6 +7290,12 @@
#define CONPTY_1909_BUILD MAKE_VER(10, 0, 18363)
/*
+ * Stay ahead of the next update, and when it's done, fix this.
+ * version ? (2020 update, temporarily use the build number of insider preview)
+ */
+#define CONPTY_NEXT_UPDATE_BUILD MAKE_VER(10, 0, 19587)
+
+/*
* Confirm until this version. Also the logic changes.
* insider preview.
*/
@@ -7334,6 +7341,9 @@
conpty_type = 2;
if (ver < CONPTY_FIRST_SUPPORT_BUILD)
conpty_type = 1;
+
+ if (ver >= CONPTY_NEXT_UPDATE_BUILD)
+ conpty_fix_type = 1;
}
#if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL) || defined(PROTO)
@@ -7622,6 +7632,12 @@
return conpty_stable;
}
+ int
+get_conpty_fix_type(void)
+{
+ return conpty_fix_type;
+}
+
#if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL) || defined(PROTO)
void
resize_console_buf(void)
diff --git a/src/proto/os_win32.pro b/src/proto/os_win32.pro
index e60ce92..15c1323 100644
--- a/src/proto/os_win32.pro
+++ b/src/proto/os_win32.pro
@@ -79,5 +79,6 @@
int has_conpty_working(void);
int get_conpty_type(void);
int is_conpty_stable(void);
+int get_conpty_fix_type(void);
void resize_console_buf(void);
/* vim: set ft=c : */
diff --git a/src/version.c b/src/version.c
index 8e08363..ebe266e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -747,6 +747,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 656,
+/**/
655,
/**/
654,