@@ -516,8 +516,6 @@ static int line_popcount(ScreenCell *buffer, int row, int rows, int cols)
516
516
return col + 1 ;
517
517
}
518
518
519
- #define REFLOW (screen->reflow)
520
-
521
519
static void resize_buffer (VTermScreen * screen , int bufidx , int new_rows , int new_cols , bool active , VTermStateFields * statefields )
522
520
{
523
521
int old_rows = screen -> rows ;
@@ -548,13 +546,13 @@ static void resize_buffer(VTermScreen *screen, int bufidx, int new_rows, int new
548
546
while (old_row >= 0 ) {
549
547
int old_row_end = old_row ;
550
548
/* TODO: Stop if dwl or dhl */
551
- while (REFLOW && old_lineinfo && old_row >= 0 && old_lineinfo [old_row ].continuation )
549
+ while (screen -> reflow && old_lineinfo && old_row >= 0 && old_lineinfo [old_row ].continuation )
552
550
old_row -- ;
553
551
int old_row_start = old_row ;
554
552
555
553
int width = 0 ;
556
554
for (int row = old_row_start ; row <= old_row_end ; row ++ ) {
557
- if (REFLOW && row < (old_rows - 1 ) && old_lineinfo [row + 1 ].continuation )
555
+ if (screen -> reflow && row < (old_rows - 1 ) && old_lineinfo [row + 1 ].continuation )
558
556
width += old_cols ;
559
557
else
560
558
width += line_popcount (old_buffer , row , old_rows , old_cols );
@@ -563,7 +561,7 @@ static void resize_buffer(VTermScreen *screen, int bufidx, int new_rows, int new
563
561
if (final_blank_row == (new_row + 1 ) && width == 0 )
564
562
final_blank_row = new_row ;
565
563
566
- int new_height = REFLOW
564
+ int new_height = screen -> reflow
567
565
? width ? (width + new_cols - 1 ) / new_cols : 1
568
566
: 1 ;
569
567
@@ -636,7 +634,7 @@ static void resize_buffer(VTermScreen *screen, int bufidx, int new_rows, int new
636
634
if (old_col == old_cols ) {
637
635
old_row ++ ;
638
636
639
- if (!REFLOW ) {
637
+ if (!screen -> reflow ) {
640
638
new_col ++ ;
641
639
break ;
642
640
}
0 commit comments