diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2024-09-18 04:14:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-18 04:14:06 -0700 |
commit | ff85e54939b0aca34a779a2b6381d09db1858b29 (patch) | |
tree | eea30db8b69582af6c206b1a8ac0b4918fc61e20 /src/nvim/main.c | |
parent | 22553e1f38addd867ad659b2944d00129141a499 (diff) | |
download | rneovim-ff85e54939b0aca34a779a2b6381d09db1858b29.tar.gz rneovim-ff85e54939b0aca34a779a2b6381d09db1858b29.tar.bz2 rneovim-ff85e54939b0aca34a779a2b6381d09db1858b29.zip |
feat(tui): builtin UI (TUI) sets client info #30397
Problem:
The default builtin UI client does not declare its client info. This
reduces discoverability and makes it difficult for plugins to identify
the UI.
Solution:
- Call nvim_set_client_info after attaching, as recommended by `:help dev-ui`.
- Also set the "pid" field.
- Also change `ui_active()` to return a count. Not directly relevant to
this commit, but will be useful later.
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r-- | src/nvim/main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index 0b49ea13d7..e060d0dcaf 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -351,7 +351,6 @@ int main(int argc, char **argv) // NORETURN: Start builtin UI client. if (ui_client_channel_id) { - time_finish(); ui_client_run(remote_ui); // NORETURN } assert(!ui_client_channel_id && !use_builtin_ui); @@ -1514,7 +1513,7 @@ static void init_startuptime(mparm_T *paramp) } for (int i = 1; i < paramp->argc - 1; i++) { if (STRICMP(paramp->argv[i], "--startuptime") == 0) { - time_init(paramp->argv[i + 1], is_embed ? "Embedded" : "Primary/TUI"); + time_init(paramp->argv[i + 1], is_embed ? "Embedded" : "Primary (or UI client)"); time_start("--- NVIM STARTING ---"); break; } |