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:
@@ -182,9 +182,10 @@ bool ui_override(void)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ui_active(void)
|
||||
/// Gets the number of UIs connected to this server.
|
||||
size_t ui_active(void)
|
||||
{
|
||||
return ui_count > 0;
|
||||
return ui_count;
|
||||
}
|
||||
|
||||
void ui_refresh(void)
|
||||
@@ -197,7 +198,7 @@ void ui_refresh(void)
|
||||
int height = INT_MAX;
|
||||
bool ext_widgets[kUIExtCount];
|
||||
bool inclusive = ui_override();
|
||||
memset(ext_widgets, ui_active(), ARRAY_SIZE(ext_widgets));
|
||||
memset(ext_widgets, !!ui_active(), ARRAY_SIZE(ext_widgets));
|
||||
|
||||
for (size_t i = 0; i < ui_count; i++) {
|
||||
RemoteUI *ui = uis[i];
|
||||
|
Reference in New Issue
Block a user