# screen_write_insertcharacter

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

```c
void screen_write_insertcharacter(struct screen_write_ctx *ctx, u_int nx, u_int bg)
```

## Parameters

- `ctx` (`struct screen_write_ctx *`)
- `nx` (`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#L1767)

## Calls

- [`grid_view_insert_cells`](/en/tmux/latest/reference/c-function-grid_view_insert_cells/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1274)
- [`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#L1276)
- [`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#L1271)
- [`screen_write_redraw_line`](/en/tmux/latest/reference/c-function-screen-write-c-screen_write_redraw_line/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1284)
- [`tty_write`](/en/tmux/latest/reference/c-function-tty_write/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1280)

## Other function references

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

## Referenced declarations

- [`tty_ctx.bg`](/en/tmux/latest/reference/c-struct-tty_ctx-bg/) (attribute)
- [`screen.cx`](/en/tmux/latest/reference/c-struct-screen-cx/) (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_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_x`](/en/tmux/latest/reference/c-define-tmux-h-screen_size_x/) (constant)
- [`screen_write_ctx`](/en/tmux/latest/reference/c-struct-screen_write_ctx/) (struct)
- [`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)
