refactor(api): move extmark API to its own file

This commit is contained in:
Björn Linse
2021-10-25 22:29:02 +02:00
parent 09e96fe609
commit c8882ca7e7
17 changed files with 917 additions and 894 deletions

View File

@@ -1410,15 +1410,6 @@ ArrayOf(Dictionary) keymap_array(String mode, buf_T *buf)
return mappings;
}
// Is the Namespace in use?
bool ns_initialized(uint64_t ns)
{
if (ns < 1) {
return false;
}
return ns < (uint64_t)next_namespace_id;
}
/// Gets the line and column of an extmark.
///
/// Extmarks may be queried by position, name or even special names
@@ -1607,18 +1598,6 @@ free_exit:
return hl_msg;
}
const char *describe_ns(NS ns_id)
{
String name;
handle_T id;
map_foreach(&namespace_ids, name, id, {
if ((NS)id == ns_id && name.size) {
return name.data;
}
})
return "(UNKNOWN PLUGIN)";
}
bool api_dict_to_keydict(void *rv, field_hash hashy, Dictionary dict, Error *err)
{
for (size_t i = 0; i < dict.size; i++) {