# grid_clear_history

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

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

## Parameters

- `gd` (`struct grid *`)

## Called by

- [`cmd_capture_pane_exec`](/en/tmux/3.2a/reference/c-function-cmd-capture-pane-c-cmd_capture_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-capture-pane.c#L204)
- [`screen_write_clearhistory`](/en/tmux/3.2a/reference/c-function-screen_write_clearhistory/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1417)

## 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#L409)
- [`xreallocarray`](/en/tmux/3.2a/reference/c-function-xreallocarray/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/grid.c#L414)

## 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.hscrolled`](/en/tmux/3.2a/reference/c-struct-grid-hscrolled/) (attribute)
- [`grid.hsize`](/en/tmux/3.2a/reference/c-struct-grid-hsize/) (attribute)
- [`grid.linedata`](/en/tmux/3.2a/reference/c-struct-grid-linedata/) (attribute)
- [`grid.sy`](/en/tmux/3.2a/reference/c-struct-grid-sy/) (attribute)
