# grid_view_clear_history

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

```c
void grid_view_clear_history(struct grid *gd, u_int bg)
```

## Parameters

- `gd` (`struct grid *`)
- `bg` (`u_int`)

## Called by

- [`screen_write_clearendofscreen`](/en/tmux/3.2a/reference/c-function-screen_write_clearendofscreen/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1357)
- [`screen_write_clearscreen`](/en/tmux/3.2a/reference/c-function-screen_write_clearscreen/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1405)

## Calls

- [`grid_collect_history`](/en/tmux/3.2a/reference/c-function-grid_collect_history/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/grid-view.c#L85)
- [`grid_scroll_history`](/en/tmux/3.2a/reference/c-function-grid_scroll_history/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/grid-view.c#L86)
- [`grid_view_clear`](/en/tmux/3.2a/reference/c-function-grid_view_clear/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/grid-view.c#L79)

## Other function references

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

## Referenced by

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

## Referenced declarations

- [`grid_line.cellused`](/en/tmux/3.2a/reference/c-struct-grid_line-cellused/) (attribute)
- [`grid`](/en/tmux/3.2a/reference/c-struct-grid/) (struct)
- [`grid_view_y`](/en/tmux/3.2a/reference/c-define-grid-view-c-grid_view_y/) (constant)
- [`grid.hscrolled`](/en/tmux/3.2a/reference/c-struct-grid-hscrolled/) (attribute)
- [`grid.sx`](/en/tmux/3.2a/reference/c-struct-grid-sx/) (attribute)
- [`grid.sy`](/en/tmux/3.2a/reference/c-struct-grid-sy/) (attribute)
