diff options
author | Gregory Anders <8965202+gpanders@users.noreply.github.com> | 2024-01-28 08:38:59 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-28 08:38:59 -0600 |
commit | 47cd532bf15d81c913e2c29b4c9a14c3654f85d2 (patch) | |
tree | ddbf09003aaa78949ff96da018379d2c4582aa39 | |
parent | 1bc7e18aa81343952d3e3e5a5d5440dd3e270af9 (diff) | |
download | rneovim-47cd532bf15d81c913e2c29b4c9a14c3654f85d2.tar.gz rneovim-47cd532bf15d81c913e2c29b4c9a14c3654f85d2.tar.bz2 rneovim-47cd532bf15d81c913e2c29b4c9a14c3654f85d2.zip |
docs: explain why TUI is reinitialized on resume (#27177)
-rw-r--r-- | src/nvim/tui/tui.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index d760fcf324..d4bbb8a924 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -269,6 +269,10 @@ static void tui_query_kitty_keyboard(TUIData *tui) out(tui, S_LEN("\x1b[?u\x1b[c")); } +/// Enable the alternate screen and emit other control sequences to start the TUI. +/// +/// This is also called when the TUI is resumed after being suspended. We reinitialize all state +/// from terminfo just in case the controlling terminal has changed (#27177). static void terminfo_start(TUIData *tui) { tui->scroll_region_is_full_screen = true; @@ -418,6 +422,7 @@ static void terminfo_start(TUIData *tui) flush_buf(tui); } +/// Disable the alternate screen and prepare for the TUI to close. static void terminfo_stop(TUIData *tui) { // Destroy output stuff @@ -489,7 +494,7 @@ static void tui_terminal_after_startup(TUIData *tui) flush_buf(tui); } -/// stop the terminal but allow it to restart later (like after suspend) +/// Stop the terminal but allow it to restart later (like after suspend) static void tui_terminal_stop(TUIData *tui) { if (uv_is_closing((uv_handle_t *)&tui->output_handle)) { |