src/nvim/screen.c
/// End a group of grid_puts_len calls and send the screen buffer to the UI
/// layer.
///
/// @param set_cursor Move the visible cursor to the end of the changed region.
///                   This is a workaround for not yet refactored code paths
///                   and shouldn't be used in new code.
End a group of grid_puts_len calls and send the screen buffer to the UI
layer.
End a group of grid_puts_len calls and send the screen buffer to the UI layer .
void grid_puts_line_flush(bool set_cursor)
{
  assert(put_dirty_row != -1);
  if (put_dirty_first < put_dirty_last) {
    if (set_cursor) {
      ui_grid_cursor_goto(put_dirty_grid->handle, put_dirty_row,
                          MIN(put_dirty_last, put_dirty_grid->Columns-1));
    }
    if (!put_dirty_grid->throttled) {
      ui_line(put_dirty_grid, put_dirty_row, put_dirty_first, put_dirty_last,
              put_dirty_last, 0, false);
    } else if (put_dirty_grid->dirty_col) {
      if (put_dirty_last > put_dirty_grid->dirty_col[put_dirty_row]) {
        put_dirty_grid->dirty_col[put_dirty_row] = put_dirty_last;
      }
    }
    put_dirty_first = INT_MAX;
    put_dirty_last = 0;
  }
  put_dirty_row = -1;
  put_dirty_grid = NULL;
}
void grid_puts_line_flush ( bool set_cursor ) { assert ( put_dirty_row != -1 ) ; if ( put_dirty_first < put_dirty_last ) { if ( set_cursor ) { ui_grid_cursor_goto ( put_dirty_grid -> handle , put_dirty_row , MIN ( put_dirty_last , put_dirty_grid -> Columns - 1 ) ) ; } if ( ! put_dirty_grid -> throttled ) { ui_line ( put_dirty_grid , put_dirty_row , put_dirty_first , put_dirty_last , put_dirty_last , 0 , false ) ; } else if ( put_dirty_grid -> dirty_col ) { if ( put_dirty_last > put_dirty_grid -> dirty_col [ put_dirty_row ] ) { put_dirty_grid -> dirty_col [ put_dirty_row ] = put_dirty_last ; } } put_dirty_first = INT_MAX ; put_dirty_last = 0 ; } put_dirty_row = -1 ; put_dirty_grid = NULL ; }
End a group of grid_puts_len calls and send the screen buffer to the UI
layer.
End a group of grid_puts_len calls and send the screen buffer to the UI layer .