]> granicus.if.org Git - vim/commitdiff
patch 8.2.0656: MS-Windows: redrawing right screen edge may not be needed v8.2.0656
authorBram Moolenaar <Bram@vim.org>
Tue, 28 Apr 2020 18:44:42 +0000 (20:44 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 28 Apr 2020 18:44:42 +0000 (20:44 +0200)
Problem:    MS-Windows: redrawing right screen edge may not be needed.
Solution:   Check the build version. (Nobuhiro Takasaki, closes #6002)

src/drawscreen.c
src/os_win32.c
src/proto/os_win32.pro
src/version.c

index be4d6aa7ca122f5a5bed3bc287319d2f95424f03..faecaa44bf856e6eafa49c0063ce37c04284d978 100644 (file)
@@ -2439,7 +2439,8 @@ win_update(win_T *wp)
 
 #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;
 
index 85efc52663a9e8311e5e6234efbfb889140630da..e4d8135ca37c5078e0f12407e5b6da1f35382cbd 100644 (file)
@@ -188,6 +188,7 @@ static int win32_set_archive(char_u *name);
 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)
@@ -7288,6 +7289,12 @@ mch_setenv(char *var, char *value, int x UNUSED)
  */
 #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 @@ vtp_flag_init(void)
        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 @@ is_conpty_stable(void)
     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)
index e60ce92ca10cc1129779787f57b02539037090f0..15c13231578d1ec558e5142fae52c35d3e34cae2 100644 (file)
@@ -79,5 +79,6 @@ int has_vtp_working(void);
 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 : */
index 8e0836333329fc61bf258be45a441f480c7ba9d9..ebe266eda9395b377343fdc642144472129f55e2 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    656,
 /**/
     655,
 /**/