@@ -158,7 +158,7 @@ protected void processEraseScreen(int eraseOption) throws IOException {
158
158
topLeft .x = 0 ;
159
159
topLeft .y = info .window .top ;
160
160
int screenLength = info .window .height () * info .size .x ;
161
- FillConsoleOutputAttribute (console , originalColors , screenLength , topLeft , written );
161
+ FillConsoleOutputAttribute (console , info . attributes , screenLength , topLeft , written );
162
162
FillConsoleOutputCharacterW (console , ' ' , screenLength , topLeft , written );
163
163
break ;
164
164
case ERASE_SCREEN_TO_BEGINING :
@@ -167,13 +167,13 @@ protected void processEraseScreen(int eraseOption) throws IOException {
167
167
topLeft2 .y = info .window .top ;
168
168
int lengthToCursor = (info .cursorPosition .y - info .window .top ) * info .size .x
169
169
+ info .cursorPosition .x ;
170
- FillConsoleOutputAttribute (console , originalColors , lengthToCursor , topLeft2 , written );
170
+ FillConsoleOutputAttribute (console , info . attributes , lengthToCursor , topLeft2 , written );
171
171
FillConsoleOutputCharacterW (console , ' ' , lengthToCursor , topLeft2 , written );
172
172
break ;
173
173
case ERASE_SCREEN_TO_END :
174
174
int lengthToEnd = (info .window .bottom - info .cursorPosition .y ) * info .size .x +
175
175
(info .size .x - info .cursorPosition .x );
176
- FillConsoleOutputAttribute (console , originalColors , lengthToEnd , info .cursorPosition .copy (), written );
176
+ FillConsoleOutputAttribute (console , info . attributes , lengthToEnd , info .cursorPosition .copy (), written );
177
177
FillConsoleOutputCharacterW (console , ' ' , lengthToEnd , info .cursorPosition .copy (), written );
178
178
break ;
179
179
default :
@@ -189,18 +189,18 @@ protected void processEraseLine(int eraseOption) throws IOException {
189
189
case ERASE_LINE :
190
190
COORD leftColCurrRow = info .cursorPosition .copy ();
191
191
leftColCurrRow .x = 0 ;
192
- FillConsoleOutputAttribute (console , originalColors , info .size .x , leftColCurrRow , written );
192
+ FillConsoleOutputAttribute (console , info . attributes , info .size .x , leftColCurrRow , written );
193
193
FillConsoleOutputCharacterW (console , ' ' , info .size .x , leftColCurrRow , written );
194
194
break ;
195
195
case ERASE_LINE_TO_BEGINING :
196
196
COORD leftColCurrRow2 = info .cursorPosition .copy ();
197
197
leftColCurrRow2 .x = 0 ;
198
- FillConsoleOutputAttribute (console , originalColors , info .cursorPosition .x , leftColCurrRow2 , written );
198
+ FillConsoleOutputAttribute (console , info . attributes , info .cursorPosition .x , leftColCurrRow2 , written );
199
199
FillConsoleOutputCharacterW (console , ' ' , info .cursorPosition .x , leftColCurrRow2 , written );
200
200
break ;
201
201
case ERASE_LINE_TO_END :
202
202
int lengthToLastCol = info .size .x - info .cursorPosition .x ;
203
- FillConsoleOutputAttribute (console , originalColors , lengthToLastCol , info .cursorPosition .copy (), written );
203
+ FillConsoleOutputAttribute (console , info . attributes , lengthToLastCol , info .cursorPosition .copy (), written );
204
204
FillConsoleOutputCharacterW (console , ' ' , lengthToLastCol , info .cursorPosition .copy (), written );
205
205
break ;
206
206
default :
0 commit comments