@@ -19,6 +19,7 @@ export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void
1919 ctx . value . page . evaluate ( `
2020 window.term.options.minimumContrastRatio = 1;
2121 window.term.options.allowTransparency = false;
22+ window.term.options.theme = undefined;
2223 ` ) ;
2324 // Clear the cached screenshot before each test
2425 frameDetails = undefined ;
@@ -144,7 +145,7 @@ export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void
144145 await pollFor ( ctx . value . page , ( ) => getCellColor ( ctx . value , 8 , 1 ) , [ 22 , 23 , 24 , 255 ] ) ;
145146 } ) ;
146147
147- test ( 'foreground 0-15 inivisible ' , async ( ) => {
148+ test ( 'foreground 0-15 invisible ' , async ( ) => {
148149 const theme : ITheme = {
149150 black : '#010203' ,
150151 red : '#040506' ,
@@ -167,7 +168,7 @@ export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void
167168 await pollFor ( ctx . value . page , ( ) => getCellColor ( ctx . value , 8 , 1 ) , [ 0 , 0 , 0 , 255 ] ) ;
168169 } ) ;
169170
170- test ( 'background 0-15 inivisible ' , async ( ) => {
171+ test ( 'background 0-15 invisible ' , async ( ) => {
171172 const theme : ITheme = {
172173 black : '#010203' ,
173174 red : '#040506' ,
@@ -1070,6 +1071,19 @@ export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void
10701071 await pollFor ( ctx . value . page , ( ) => getCellColor ( ctx . value , 2 , 1 ) , [ 0 , 0 , 255 , 255 ] ) ; // inverse background of ' ' should be decoration bg override
10711072 } ) ;
10721073 } ) ;
1074+
1075+ test . describe ( 'regression tests' , ( ) => {
1076+ test ( '#4758: multiple invisible text characters without SGR change should not be rendered' , async ( ) => {
1077+ // Regression test: #4758 when multiple invisible characters are used
1078+ await ctx . value . proxy . writeln ( `■\x1b[8m■■` ) ;
1079+ // Full refresh as the before result is the same as after
1080+ await ctx . value . proxy . refresh ( 0 , await ctx . value . proxy . rows - 1 ) ;
1081+ // Control to ensure rendering has occurred
1082+ await pollFor ( ctx . value . page , ( ) => getCellColor ( ctx . value , 1 , 1 ) , [ 255 , 255 , 255 , 255 ] ) ;
1083+ await pollFor ( ctx . value . page , ( ) => getCellColor ( ctx . value , 2 , 1 ) , [ 0 , 0 , 0 , 255 ] ) ;
1084+ await pollFor ( ctx . value . page , ( ) => getCellColor ( ctx . value , 3 , 1 ) , [ 0 , 0 , 0 , 255 ] ) ;
1085+ } ) ;
1086+ } ) ;
10731087}
10741088
10751089/**
0 commit comments