createCellsCursor method

VtRenderRowCellsCursor createCellsCursor()

Creates a live cell cursor for this row.

Implementation

VtRenderRowCellsCursor createCellsCursor() {
  final cells = calloc<bindings.GhosttyRenderStateRowCells>();
  try {
    _checkResult(
      bindings.ghostty_render_state_row_cells_new(ffi.nullptr, cells),
      'ghostty_render_state_row_cells_new',
    );
    _checkResult(
      bindings.ghostty_render_state_row_get(
        _handle,
        bindings
            .GhosttyRenderStateRowData
            .GHOSTTY_RENDER_STATE_ROW_DATA_CELLS,
        cells.cast(),
      ),
      'ghostty_render_state_row_get',
    );
    return VtRenderRowCellsCursor._(cells.value);
  } finally {
    calloc.free(cells);
  }
}