@@ -4440,17 +4440,17 @@ static void grid_move_line(ScreenGrid *grid, int row, int coloff, int endcol,
4440
4440
schar_T sc ;
4441
4441
schar_from_char (sc , c );
4442
4442
4443
- if (schar_cmp (grid -> ScreenLines [off_to ], sc )
4444
- || grid -> ScreenAttrs [off_to ] != hl ) {
4445
- schar_copy (grid -> ScreenLines [off_to ], sc );
4446
- grid -> ScreenAttrs [off_to ] = hl ;
4443
+ if (schar_cmp (default_grid . ScreenLines [off_to ], sc )
4444
+ || default_grid . ScreenAttrs [off_to ] != hl ) {
4445
+ schar_copy (default_grid . ScreenLines [off_to ], sc );
4446
+ default_grid . ScreenAttrs [off_to ] = hl ;
4447
4447
if (start_dirty == -1 ) {
4448
4448
start_dirty = col ;
4449
4449
}
4450
4450
end_dirty = col + 1 ;
4451
4451
}
4452
4452
} else
4453
- grid -> LineWraps [row ] = FALSE ;
4453
+ default_grid . LineWraps [row ] = false ;
4454
4454
}
4455
4455
4456
4456
if (clear_end < end_dirty ) {
@@ -4460,7 +4460,7 @@ static void grid_move_line(ScreenGrid *grid, int row, int coloff, int endcol,
4460
4460
start_dirty = end_dirty ;
4461
4461
}
4462
4462
if (clear_end > start_dirty ) {
4463
- ui_line (row , coloff + start_dirty , coloff + end_dirty , coloff + clear_end ,
4463
+ ui_line (grid , row , coloff + start_dirty , coloff + end_dirty , coloff + clear_end ,
4464
4464
bg_attr );
4465
4465
}
4466
4466
}
@@ -5424,7 +5424,7 @@ void screen_puts_line_flush(bool set_cursor)
5424
5424
if (set_cursor ) {
5425
5425
ui_cursor_goto (put_dirty_row , put_dirty_last );
5426
5426
}
5427
- ui_line (put_dirty_row , put_dirty_first , put_dirty_last , put_dirty_last , 0 );
5427
+ ui_line (& default_grid , put_dirty_row , put_dirty_first , put_dirty_last , put_dirty_last , 0 );
5428
5428
put_dirty_first = -1 ;
5429
5429
put_dirty_last = 0 ;
5430
5430
}
@@ -5785,16 +5785,16 @@ void grid_fill(ScreenGrid *grid, int start_row, int end_row, int start_col,
5785
5785
put_dirty_last = MAX (put_dirty_last , dirty_last );
5786
5786
} else {
5787
5787
int last = c2 != ' ' ? dirty_last : dirty_first + (c1 != ' ' );
5788
- ui_line (row , dirty_first , last , dirty_last , attr );
5788
+ ui_line (grid , row , dirty_first , last , dirty_last , attr );
5789
5789
}
5790
5790
}
5791
5791
5792
- if (end_col == grid -> Columns ) {
5792
+ if (end_col == Columns ) {
5793
5793
grid -> LineWraps [row ] = false;
5794
5794
}
5795
5795
5796
5796
// TODO(bfredl): The relevant caller should do this
5797
- if (row == Rows - 1 ) { // overwritten the command line
5797
+ if (row == grid -> Rows - 1 ) { // overwritten the command line
5798
5798
redraw_cmdline = true;
5799
5799
if (c1 == ' ' && c2 == ' ' ) {
5800
5800
clear_cmdline = false; // command line has been cleared
@@ -7056,8 +7056,8 @@ void screen_resize(int width, int height)
7056
7056
width = Columns ;
7057
7057
ui_resize (width , height );
7058
7058
7059
- Rows = default_grid . Rows ;
7060
- Columns = default_grid . Columns ;
7059
+ default_grid . Rows = screen_Rows ;
7060
+ default_grid . Columns = screen_Columns ;
7061
7061
7062
7062
/* The window layout used to be adjusted here, but it now happens in
7063
7063
* screenalloc() (also invoked from screenclear()). That is because the
0 commit comments