# grid_collect_history

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/grid.c#L349
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-grid_collect_history/

```c
void grid_collect_history(struct grid *gd)
```

## Parameters

- `gd` (`struct grid *`)

## Called by

- [`grid_view_clear_history`](/en/tmux/3.2a/reference/c-function-grid_view_clear_history/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/grid-view.c#L85)
- [`grid_view_scroll_region_up`](/en/tmux/3.2a/reference/c-function-grid_view_scroll_region_up/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/grid-view.c#L110)

## Calls

- [`grid_trim_history`](/en/tmux/3.2a/reference/c-function-grid-c-grid_trim_history/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/grid.c#L366)

## Referenced by

- [`server_client_push_stderr`](/en/tmux/3.2a/reference/c-function-server_client_push_stderr/) (function)

## Referenced declarations

- [`grid`](/en/tmux/3.2a/reference/c-struct-grid/) (struct)
- [`grid.hlimit`](/en/tmux/3.2a/reference/c-struct-grid-hlimit/) (attribute)
- [`grid.hscrolled`](/en/tmux/3.2a/reference/c-struct-grid-hscrolled/) (attribute)
- [`grid.hsize`](/en/tmux/3.2a/reference/c-struct-grid-hsize/) (attribute)
