# grid_duplicate_lines

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L1182
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-grid_duplicate_lines/

```c
void grid_duplicate_lines(struct grid *dst, u_int dy, struct grid *src, u_int sy, u_int ny)
```

## Parameters

- `dst` (`struct grid *`)
- `dy` (`u_int`)
- `src` (`struct grid *`)
- `sy` (`u_int`)
- `ny` (`u_int`)

## Called by

- [`window_copy_clone_screen`](/en/tmux/latest/reference/c-function-window-copy-c-window_copy_clone_screen/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L397)

## Calls

- [`grid_free_lines`](/en/tmux/latest/reference/c-function-grid-c-grid_free_lines/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L1192)
- [`xreallocarray`](/en/tmux/latest/reference/c-function-xreallocarray/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L1200)

## Referenced by

- [`screen_alternate_off`](/en/tmux/latest/reference/c-function-screen_alternate_off/) (function)
- [`screen_alternate_on`](/en/tmux/latest/reference/c-function-screen_alternate_on/) (function)

## Referenced declarations

- [`grid_line.celldata`](/en/tmux/latest/reference/c-struct-grid_line-celldata/) (attribute)
- [`grid_line.cellsize`](/en/tmux/latest/reference/c-struct-grid_line-cellsize/) (attribute)
- [`grid_line.extddata`](/en/tmux/latest/reference/c-struct-grid_line-extddata/) (attribute)
- [`grid_line.extdsize`](/en/tmux/latest/reference/c-struct-grid_line-extdsize/) (attribute)
- [`grid`](/en/tmux/latest/reference/c-struct-grid/) (struct)
- [`grid.hsize`](/en/tmux/latest/reference/c-struct-grid-hsize/) (attribute)
- [`grid.linedata`](/en/tmux/latest/reference/c-struct-grid-linedata/) (attribute)
- [`grid.sy`](/en/tmux/latest/reference/c-struct-grid-sy/) (attribute)
