Skip to content

Commit 21edde8

Browse files
committed
patch 8.1.0938: background color is wrong in MS-Windows console
Problem: Background color is wrong in MS-Windows console when not using VTP. Solution: Use g_attrCurrent. (Nobuhiro Takasaki, closes #3987)
1 parent f1b57ab commit 21edde8

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

src/os_win32.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6031,7 +6031,10 @@ insert_lines(unsigned cLines)
60316031

60326032
{
60336033
fill.Char.AsciiChar = ' ';
6034-
fill.Attributes = g_attrDefault;
6034+
if (!USE_VTP)
6035+
fill.Attributes = g_attrCurrent;
6036+
else
6037+
fill.Attributes = g_attrDefault;
60356038

60366039
set_console_color_rgb();
60376040

@@ -6085,7 +6088,10 @@ delete_lines(unsigned cLines)
60856088

60866089
{
60876090
fill.Char.AsciiChar = ' ';
6088-
fill.Attributes = g_attrDefault;
6091+
if (!USE_VTP)
6092+
fill.Attributes = g_attrCurrent;
6093+
else
6094+
fill.Attributes = g_attrDefault;
60896095

60906096
set_console_color_rgb();
60916097

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,8 @@ static char *(features[]) =
779779

780780
static int included_patches[] =
781781
{ /* Add new patch number below this line */
782+
/**/
783+
938,
782784
/**/
783785
937,
784786
/**/

0 commit comments

Comments
 (0)