Skip to content

Commit 2c01e1f

Browse files
committed
Merge mirror
2 parents 2ba6ea6 + dfc4c5e commit 2c01e1f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/screen.c

+4-6
Original file line numberDiff line numberDiff line change
@@ -516,8 +516,6 @@ static int line_popcount(ScreenCell *buffer, int row, int rows, int cols)
516516
return col + 1;
517517
}
518518

519-
#define REFLOW (screen->reflow)
520-
521519
static void resize_buffer(VTermScreen *screen, int bufidx, int new_rows, int new_cols, bool active, VTermStateFields *statefields)
522520
{
523521
int old_rows = screen->rows;
@@ -548,13 +546,13 @@ static void resize_buffer(VTermScreen *screen, int bufidx, int new_rows, int new
548546
while(old_row >= 0) {
549547
int old_row_end = old_row;
550548
/* 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)
552550
old_row--;
553551
int old_row_start = old_row;
554552

555553
int width = 0;
556554
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)
558556
width += old_cols;
559557
else
560558
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
563561
if(final_blank_row == (new_row + 1) && width == 0)
564562
final_blank_row = new_row;
565563

566-
int new_height = REFLOW
564+
int new_height = screen->reflow
567565
? width ? (width + new_cols - 1) / new_cols : 1
568566
: 1;
569567

@@ -636,7 +634,7 @@ static void resize_buffer(VTermScreen *screen, int bufidx, int new_rows, int new
636634
if(old_col == old_cols) {
637635
old_row++;
638636

639-
if(!REFLOW) {
637+
if(!screen->reflow) {
640638
new_col++;
641639
break;
642640
}

0 commit comments

Comments
 (0)