mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 14:38:32 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user