# screen_write_collect_flush

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1551
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-screen-write-c-screen_write_collect_flush/

```c
static void screen_write_collect_flush(struct screen_write_ctx *, int, const char *)
```

## Parameters

- `ctx` (`struct screen_write_ctx *`)
- `scroll_only` (`int`)
- `from` (`const char *`)

## Called by

- [`screen_write_alternateoff`](/en/tmux/3.2a/reference/c-function-screen_write_alternateoff/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L2025)
- [`screen_write_alternateon`](/en/tmux/3.2a/reference/c-function-screen_write_alternateon/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L2007)
- [`screen_write_cell`](/en/tmux/3.2a/reference/c-function-screen_write_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1737)
- [`screen_write_clearcharacter`](/en/tmux/3.2a/reference/c-function-screen_write_clearcharacter/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1008)
- [`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#L1365)
- [`screen_write_clearstartofscreen`](/en/tmux/3.2a/reference/c-function-screen_write_clearstartofscreen/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1388)
- [`screen_write_collect_add`](/en/tmux/3.2a/reference/c-function-screen_write_collect_add/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1694)
- [`screen_write_deletecharacter`](/en/tmux/3.2a/reference/c-function-screen_write_deletecharacter/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L980)
- [`screen_write_deleteline`](/en/tmux/3.2a/reference/c-function-screen_write_deleteline/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1082)
- [`screen_write_insertcharacter`](/en/tmux/3.2a/reference/c-function-screen_write_insertcharacter/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L952)
- [`screen_write_insertline`](/en/tmux/3.2a/reference/c-function-screen_write_insertline/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1035)
- [`screen_write_linefeed`](/en/tmux/3.2a/reference/c-function-screen_write_linefeed/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1274)
- [`screen_write_reverseindex`](/en/tmux/3.2a/reference/c-function-screen_write_reverseindex/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1224)
- [`screen_write_scrolldown`](/en/tmux/3.2a/reference/c-function-screen_write_scrolldown/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1331)
- [`screen_write_scrollregion`](/en/tmux/3.2a/reference/c-function-screen_write_scrollregion/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1249)
- [`screen_write_scrollup`](/en/tmux/3.2a/reference/c-function-screen_write_scrollup/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1300)
- [`screen_write_stop`](/en/tmux/3.2a/reference/c-function-screen_write_stop/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L299)

## Calls

- [`fatalx`](/en/tmux/3.2a/reference/c-function-fatalx/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1583)
- [`log_debug`](/en/tmux/3.2a/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1561)
- [`screen_write_free_citem`](/en/tmux/3.2a/reference/c-function-screen-write-c-screen_write_free_citem/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1603)
- [`screen_write_initctx`](/en/tmux/3.2a/reference/c-function-screen-write-c-screen_write_initctx/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1566)
- [`screen_write_set_cursor`](/en/tmux/3.2a/reference/c-function-screen-write-c-screen_write_set_cursor/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1586)
- [`tty_write`](/en/tmux/3.2a/reference/c-function-tty_write/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1569)

## Other function references

- [`tty_cmd_cells`](/en/tmux/3.2a/reference/c-function-tty_cmd_cells/) (function)
- [`tty_cmd_clearcharacter`](/en/tmux/3.2a/reference/c-function-tty_cmd_clearcharacter/) (function)
- [`tty_cmd_scrollup`](/en/tmux/3.2a/reference/c-function-tty_cmd_scrollup/) (function)

## Referenced declarations

- [`screen_write_citem.bg`](/en/tmux/3.2a/reference/c-struct-screen_write_citem-bg/) (attribute)
- [`screen_write_ctx.bg`](/en/tmux/3.2a/reference/c-struct-screen_write_ctx-bg/) (attribute)
- [`tty_ctx.bg`](/en/tmux/3.2a/reference/c-struct-tty_ctx-bg/) (attribute)
- [`tty_ctx.cell`](/en/tmux/3.2a/reference/c-struct-tty_ctx-cell/) (attribute)
- [`screen.cx`](/en/tmux/3.2a/reference/c-struct-screen-cx/) (attribute)
- [`screen.cy`](/en/tmux/3.2a/reference/c-struct-screen-cy/) (attribute)
- [`screen_write_cline.data`](/en/tmux/3.2a/reference/c-struct-screen_write_cline-data/) (attribute)
- [`screen_write_citem.gc`](/en/tmux/3.2a/reference/c-struct-screen_write_citem-gc/) (attribute)
- [`screen_write_cline.items`](/en/tmux/3.2a/reference/c-struct-screen_write_cline-items/) (attribute)
- [`tty_ctx.num`](/en/tmux/3.2a/reference/c-struct-tty_ctx-num/) (attribute)
- [`tty_ctx.ptr`](/en/tmux/3.2a/reference/c-struct-tty_ctx-ptr/) (attribute)
- [`screen.rlower`](/en/tmux/3.2a/reference/c-struct-screen-rlower/) (attribute)
- [`screen.rupper`](/en/tmux/3.2a/reference/c-struct-screen-rupper/) (attribute)
- [`screen_write_ctx.s`](/en/tmux/3.2a/reference/c-struct-screen_write_ctx-s/) (attribute)
- [`tty_ctx.s`](/en/tmux/3.2a/reference/c-struct-tty_ctx-s/) (attribute)
- [`screen_size_y`](/en/tmux/3.2a/reference/c-define-tmux-h-screen_size_y/) (constant)
- [`screen_write_ctx`](/en/tmux/3.2a/reference/c-struct-screen_write_ctx/) (struct)
- [`screen_write_ctx.scrolled`](/en/tmux/3.2a/reference/c-struct-screen_write_ctx-scrolled/) (attribute)
- [`screen_write_citem.type`](/en/tmux/3.2a/reference/c-struct-screen_write_citem-type/) (attribute)
- [`screen_write_citem.used`](/en/tmux/3.2a/reference/c-struct-screen_write_citem-used/) (attribute)
- [`screen_write_citem.wrapped`](/en/tmux/3.2a/reference/c-struct-screen_write_citem-wrapped/) (attribute)
- [`tty_ctx.wrapped`](/en/tmux/3.2a/reference/c-struct-tty_ctx-wrapped/) (attribute)
- [`screen.write_list`](/en/tmux/3.2a/reference/c-struct-screen-write_list/) (attribute)
- [`screen_write_citem.x`](/en/tmux/3.2a/reference/c-struct-screen_write_citem-x/) (attribute)
