src/nvim/screen.c
/// Determine if dedicated window grid should be used or the default_grid
///
/// If UI did not request multigrid support, draw all windows on the
/// default_grid.
///
/// NB: this function can only been used with window grids in a context where
/// win_grid_alloc already has been called!
///
/// If the default_grid is used, adjust window relative positions to global
/// screen positions.
Determine if dedicated window grid should be used or the default_grid
If UI did not request multigrid support, draw all windows on the
default_grid.

this function can only been used with window grids in a context where
win_grid_alloc already has been called!

If the default_grid is used, adjust window relative positions to global
screen positions.
Determine if dedicated window grid should be used or the default_grid If UI did not request multigrid support draw all windows on the default_grid . this function can only been used with window grids in a context where win_grid_alloc already has been called! If the default_grid is used adjust window relative positions to global screen positions .
void screen_adjust_grid(ScreenGrid **grid, int *row_off, int *col_off)
{
  if (!(*grid)->chars && *grid != &default_grid) {
      *row_off += (*grid)->row_offset;
      *col_off += (*grid)->col_offset;
    if (*grid == &msg_grid_adj && msg_grid.chars) {
      *grid = &msg_grid;
    } else {
      *grid = &default_grid;
    }
  }
}
void screen_adjust_grid ( ScreenGrid * * grid , int * row_off , int * col_off ) { if ( ! ( * grid ) -> chars && * grid != & default_grid ) { * row_off += ( * grid ) -> row_offset ; * col_off += ( * grid ) -> col_offset ; if ( * grid == & msg_grid_adj && msg_grid . chars ) { * grid = & msg_grid ; } else { * grid = & default_grid ; } } }
Determine if dedicated window grid should be used or the default_grid
If UI did not request multigrid support, draw all windows on the
default_grid.
Determine if dedicated window grid should be used or the default_grid If UI did not request multigrid support draw all windows on the default_grid .