@@ -4413,17 +4413,17 @@ static void grid_move_line(ScreenGrid *grid, int row, int coloff, int endcol,
4413
4413
schar_T sc ;
4414
4414
schar_from_char (sc , c );
4415
4415
4416
- if (schar_cmp (grid -> ScreenLines [off_to ], sc )
4417
- || grid -> ScreenAttrs [off_to ] != hl ) {
4418
- schar_copy (grid -> ScreenLines [off_to ], sc );
4419
- grid -> ScreenAttrs [off_to ] = hl ;
4416
+ if (schar_cmp (default_grid . ScreenLines [off_to ], sc )
4417
+ || default_grid . ScreenAttrs [off_to ] != hl ) {
4418
+ schar_copy (default_grid . ScreenLines [off_to ], sc );
4419
+ default_grid . ScreenAttrs [off_to ] = hl ;
4420
4420
if (start_dirty == -1 ) {
4421
4421
start_dirty = col ;
4422
4422
}
4423
4423
end_dirty = col + 1 ;
4424
4424
}
4425
4425
} else
4426
- grid -> LineWraps [row ] = FALSE ;
4426
+ default_grid . LineWraps [row ] = false ;
4427
4427
}
4428
4428
4429
4429
if (clear_end < end_dirty ) {
@@ -4433,7 +4433,7 @@ static void grid_move_line(ScreenGrid *grid, int row, int coloff, int endcol,
4433
4433
start_dirty = end_dirty ;
4434
4434
}
4435
4435
if (clear_end > start_dirty ) {
4436
- ui_line (row , coloff + start_dirty , coloff + end_dirty , coloff + clear_end ,
4436
+ ui_line (grid , row , coloff + start_dirty , coloff + end_dirty , coloff + clear_end ,
4437
4437
bg_attr );
4438
4438
}
4439
4439
}
@@ -5393,7 +5393,7 @@ void screen_puts_line_flush(bool set_cursor)
5393
5393
if (set_cursor || p_wd ) {
5394
5394
ui_cursor_goto (put_dirty_row , put_dirty_last );
5395
5395
}
5396
- ui_line (put_dirty_row , put_dirty_first , put_dirty_last , put_dirty_last , 0 );
5396
+ ui_line (& default_grid , put_dirty_row , put_dirty_first , put_dirty_last , put_dirty_last , 0 );
5397
5397
put_dirty_first = -1 ;
5398
5398
put_dirty_last = 0 ;
5399
5399
}
@@ -5754,16 +5754,16 @@ void grid_fill(ScreenGrid *grid, int start_row, int end_row, int start_col,
5754
5754
put_dirty_last = MAX (put_dirty_last , dirty_last );
5755
5755
} else {
5756
5756
int last = c2 != ' ' ? dirty_last : dirty_first + (c1 != ' ' );
5757
- ui_line (row , dirty_first , last , dirty_last , attr );
5757
+ ui_line (grid , row , dirty_first , last , dirty_last , attr );
5758
5758
}
5759
5759
}
5760
5760
5761
- if (end_col == grid -> Columns ) {
5761
+ if (end_col == Columns ) {
5762
5762
grid -> LineWraps [row ] = false;
5763
5763
}
5764
5764
5765
5765
// TODO(bfredl): this is ugly, the relevant caller should do this
5766
- if (row == default_grid . Rows - 1 ) { // overwritten the command line
5766
+ if (row == grid -> Rows - 1 ) { // overwritten the command line
5767
5767
redraw_cmdline = true;
5768
5768
if (c1 == ' ' && c2 == ' ' ) {
5769
5769
clear_cmdline = false; // command line has been cleared
@@ -7015,8 +7015,8 @@ void screen_resize(int width, int height)
7015
7015
width = Columns ;
7016
7016
ui_resize (width , height );
7017
7017
7018
- Rows = default_grid . Rows ;
7019
- Columns = default_grid . Columns ;
7018
+ default_grid . Rows = screen_Rows ;
7019
+ default_grid . Columns = screen_Columns ;
7020
7020
7021
7021
// TODO(bfredl): update default colors when they changed, NOT on resize.
7022
7022
ui_default_colors_set ();
0 commit comments