]> granicus.if.org Git - vim/commitdiff
patch 8.1.0938: background color is wrong in MS-Windows console v8.1.0938
authorBram Moolenaar <Bram@vim.org>
Sun, 17 Feb 2019 13:10:56 +0000 (14:10 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 17 Feb 2019 13:10:56 +0000 (14:10 +0100)
Problem:    Background color is wrong in MS-Windows console when not using VTP.
Solution:   Use g_attrCurrent. (Nobuhiro Takasaki, closes #3987)

src/os_win32.c
src/version.c

index 3627532cacb1176c6aaac51614a9a2f5a525a68a..97fc2a401b5e281f75e27f12d043a01118ba1d8b 100644 (file)
@@ -6031,7 +6031,10 @@ insert_lines(unsigned cLines)
 
     {
        fill.Char.AsciiChar = ' ';
-       fill.Attributes = g_attrDefault;
+       if (!USE_VTP)
+           fill.Attributes = g_attrCurrent;
+       else
+           fill.Attributes = g_attrDefault;
 
        set_console_color_rgb();
 
@@ -6085,7 +6088,10 @@ delete_lines(unsigned cLines)
 
     {
        fill.Char.AsciiChar = ' ';
-       fill.Attributes = g_attrDefault;
+       if (!USE_VTP)
+           fill.Attributes = g_attrCurrent;
+       else
+           fill.Attributes = g_attrDefault;
 
        set_console_color_rgb();
 
index 8509e0666c009dee916885aae8915cfdde95c772..df3aa4813c49ca90d1773c7533cbb682ad474064 100644 (file)
@@ -779,6 +779,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    938,
 /**/
     937,
 /**/