mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 23:06:14 +00:00
Changed prototypes to accept a boolean "rgb"
This commit is contained in:
@@ -59,9 +59,10 @@ void nvim_command(String command, Error *err)
|
||||
/// Retrieves highlight description from its name
|
||||
///
|
||||
/// @param name Highlight group name
|
||||
/// @param rgb True to export GUI values
|
||||
/// @return a highlight description e.g. {'bold': true, 'bg': 123, 'fg': 42}
|
||||
/// @see nvim_get_hl_by_id
|
||||
Dictionary nvim_get_hl_by_name(String name, Error *err)
|
||||
Dictionary nvim_get_hl_by_name(String name, Boolean rgb, Error *err)
|
||||
FUNC_API_SINCE(3)
|
||||
{
|
||||
Dictionary result = ARRAY_DICT_INIT;
|
||||
@@ -72,15 +73,16 @@ Dictionary nvim_get_hl_by_name(String name, Error *err)
|
||||
name.data);
|
||||
return result;
|
||||
}
|
||||
result = nvim_get_hl_by_id(id, err);
|
||||
result = nvim_get_hl_by_id(id, rgb, err);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// Retrieves highlight description from its id
|
||||
///
|
||||
/// @param hl_id highlight id as returned by |hlID()|
|
||||
/// @param rgb True to export GUI values
|
||||
/// @see nvim_get_hl_by_name
|
||||
Dictionary nvim_get_hl_by_id(Integer hl_id, Error *err)
|
||||
Dictionary nvim_get_hl_by_id(Integer hl_id, Boolean rgb, Error *err)
|
||||
FUNC_API_SINCE(3)
|
||||
{
|
||||
Dictionary dic = ARRAY_DICT_INIT;
|
||||
@@ -89,7 +91,7 @@ Dictionary nvim_get_hl_by_id(Integer hl_id, Error *err)
|
||||
return dic;
|
||||
}
|
||||
int attrcode = syn_id2attr((int)hl_id);
|
||||
return hl_get_attr_by_id(attrcode, err);
|
||||
return hl_get_attr_by_id(attrcode, rgb, err);
|
||||
}
|
||||
|
||||
/// Passes input keys to Nvim.
|
||||
|
@@ -8224,7 +8224,7 @@ RgbValue name_to_color(const uint8_t *name)
|
||||
/// Retrieves attribute description from its id
|
||||
///
|
||||
/// @param attr_id attribute id
|
||||
Dictionary hl_get_attr_by_id(Integer attr_id, Error *err)
|
||||
Dictionary hl_get_attr_by_id(Integer attr_id, Boolean rgb, Error *err)
|
||||
{
|
||||
HlAttrs attrs = HLATTRS_INIT;
|
||||
Dictionary dic = ARRAY_DICT_INIT;
|
||||
@@ -8240,7 +8240,7 @@ Dictionary hl_get_attr_by_id(Integer attr_id, Error *err)
|
||||
return dic;
|
||||
}
|
||||
|
||||
attrs = attrentry2hlattrs(aep, p_tgc);
|
||||
attrs = attrentry2hlattrs(aep, rgb);
|
||||
|
||||
end:
|
||||
return hlattrs2dict(attrs);
|
||||
|
Reference in New Issue
Block a user