# screen_write_insertline

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1367
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-screen_write_insertline/

```c
void screen_write_insertline(struct screen_write_ctx *ctx, u_int ny, u_int bg)
```

## Parameters

- `ctx` (`struct screen_write_ctx *`)
- `ny` (`u_int`)
- `bg` (`u_int`)

## Called by

- [`input_csi_dispatch`](/en/tmux/latest/reference/c-function-input-c-input_csi_dispatch/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/input.c#L1772)
- [`window_copy_scroll_down`](/en/tmux/latest/reference/c-function-window-copy-c-window_copy_scroll_down/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L6376)

## Calls

- [`grid_view_insert_lines`](/en/tmux/latest/reference/c-function-grid_view_insert_lines/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1391)
- [`grid_view_insert_lines_region`](/en/tmux/latest/reference/c-function-grid_view_insert_lines_region/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1416)
- [`screen_write_collect_flush`](/en/tmux/latest/reference/c-function-screen-write-c-screen_write_collect_flush/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1393)
- [`screen_write_initctx`](/en/tmux/latest/reference/c-function-screen-write-c-screen_write_initctx/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1388)
- [`screen_write_redraw_pane`](/en/tmux/latest/reference/c-function-screen-write-c-screen_write_redraw_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1401)
- [`tty_write`](/en/tmux/latest/reference/c-function-tty_write/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1397)

## Other function references

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

## Referenced declarations

- [`tty_ctx.bg`](/en/tmux/latest/reference/c-struct-tty_ctx-bg/) (attribute)
- [`screen.cy`](/en/tmux/latest/reference/c-struct-screen-cy/) (attribute)
- [`tty_ctx.flags`](/en/tmux/latest/reference/c-struct-tty_ctx-flags/) (attribute)
- [`window_pane.flags`](/en/tmux/latest/reference/c-struct-window_pane-flags/) (attribute)
- [`screen.grid`](/en/tmux/latest/reference/c-struct-screen-grid/) (attribute)
- [`PANE_REDRAW`](/en/tmux/latest/reference/c-define-tmux-h-pane_redraw/) (constant)
- [`screen.rlower`](/en/tmux/latest/reference/c-struct-screen-rlower/) (attribute)
- [`screen.rupper`](/en/tmux/latest/reference/c-struct-screen-rupper/) (attribute)
- [`screen_write_ctx.s`](/en/tmux/latest/reference/c-struct-screen_write_ctx-s/) (attribute)
- [`tty_ctx.s`](/en/tmux/latest/reference/c-struct-tty_ctx-s/) (attribute)
- [`screen_size_y`](/en/tmux/latest/reference/c-define-tmux-h-screen_size_y/) (constant)
- [`screen_write_ctx`](/en/tmux/latest/reference/c-struct-screen_write_ctx/) (struct)
- [`tty_ctx.sy`](/en/tmux/latest/reference/c-struct-tty_ctx-sy/) (attribute)
- [`TTY_CTX_PANE_OBSCURED`](/en/tmux/latest/reference/c-define-tmux-h-tty_ctx_pane_obscured/) (constant)
- [`screen_write_ctx.wp`](/en/tmux/latest/reference/c-struct-screen_write_ctx-wp/) (attribute)
