diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/README.md | 6 | ||||
-rw-r--r-- | src/nvim/tui/tui.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/README.md b/src/nvim/README.md index b264c918b6..9ef39cc90f 100644 --- a/src/nvim/README.md +++ b/src/nvim/README.md @@ -255,6 +255,12 @@ region is repainted internally. To also highlight excess internal redraws, use - http://bazaar.launchpad.net/~libvterm/libvterm/trunk/view/head:/doc/seqs.txt - http://invisible-island.net/xterm/ctlseqs/ctlseqs.html +Data structures +--------------- + +Buffer text is stored as a tree of line segments, defined in [memline.c](https://github.com/neovim/neovim/blob/v0.9.5/src/nvim/memline.c#L8-L35). +The central idea is found in [ml_find_line](https://github.com/neovim/neovim/blob/v0.9.5/src/nvim/memline.c#L2800). + Nvim lifecycle -------------- diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index 9cd0c64bfe..6b8b73a2a0 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -1312,6 +1312,9 @@ void tui_default_colors_set(TUIData *tui, Integer rgb_fg, Integer rgb_bg, Intege invalidate(tui, 0, tui->grid.height, 0, tui->grid.width); } +/// Flushes TUI grid state to a buffer (which is later flushed to the TTY by `flush_buf`). +/// +/// @see flush_buf void tui_flush(TUIData *tui) { UGrid *grid = &tui->grid; @@ -2327,6 +2330,9 @@ static size_t flush_buf_end(TUIData *tui, char *buf, size_t len) return offset; } +/// Flushes the rendered buffer to the TTY. +/// +/// @see tui_flush static void flush_buf(TUIData *tui) { uv_write_t req; |