diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2024-01-18 00:14:48 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-18 00:14:48 -0800 |
commit | 95cbedaa1798a7c1489b68dd60380a41443ed34b (patch) | |
tree | 92dfec6359159c229aa045fe883fdd10e8ed2bb3 /src | |
parent | 11e8e14628413e45e46d2d2a7af53d0da0c9dcdd (diff) | |
download | rneovim-95cbedaa1798a7c1489b68dd60380a41443ed34b.tar.gz rneovim-95cbedaa1798a7c1489b68dd60380a41443ed34b.tar.bz2 rneovim-95cbedaa1798a7c1489b68dd60380a41443ed34b.zip |
docs: various #25289
Co-authored-by: Jongwook Choi <wookayin@gmail.com>
Co-authored-by: Oliver Marriott <hello@omarriott.com>
Co-authored-by: Benoit de Chezelles <bew@users.noreply.github.com>
Co-authored-by: Jongwook Choi <wookayin@gmail.com>
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; |