diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-09-08 13:26:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-08 13:26:37 +0200 |
commit | cc3df63c3ba954962fc1b9ce0503a5379ef0c7d0 (patch) | |
tree | 59bd8e97d87fa5da7cc95f290f47b93eaf8dd953 /src/nvim/ui.c | |
parent | 6a8b48e24cbe070846dd1d234553b3fdeb19460e (diff) | |
parent | 5970157e1d22fd5e05ae5d3bd949f807fb7a744c (diff) | |
download | rneovim-cc3df63c3ba954962fc1b9ce0503a5379ef0c7d0.tar.gz rneovim-cc3df63c3ba954962fc1b9ce0503a5379ef0c7d0.tar.bz2 rneovim-cc3df63c3ba954962fc1b9ce0503a5379ef0c7d0.zip |
Merge pull request #24985 from bfredl/hash2
refactor(map): enhanced implementation, Clean Codeā¢, etc etc
Diffstat (limited to 'src/nvim/ui.c')
-rw-r--r-- | src/nvim/ui.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/ui.c b/src/nvim/ui.c index 7d8328d913..ba16ba545f 100644 --- a/src/nvim/ui.c +++ b/src/nvim/ui.c @@ -127,7 +127,7 @@ void ui_free_all_mem(void) kv_destroy(call_buf); UIEventCallback *event_cb; - pmap_foreach_value(&ui_event_cbs, event_cb, { + map_foreach_value(&ui_event_cbs, event_cb, { free_ui_event_callback(event_cb); }) map_destroy(uint32_t, &ui_event_cbs); @@ -661,7 +661,7 @@ void ui_call_event(char *name, Array args) { UIEventCallback *event_cb; bool handled = false; - pmap_foreach_value(&ui_event_cbs, event_cb, { + map_foreach_value(&ui_event_cbs, event_cb, { Error err = ERROR_INIT; Object res = nlua_call_ref(event_cb->cb, name, args, false, &err); if (res.type == kObjectTypeBoolean && res.data.boolean == true) { @@ -687,7 +687,7 @@ void ui_cb_update_ext(void) for (size_t i = 0; i < kUIGlobalCount; i++) { UIEventCallback *event_cb; - pmap_foreach_value(&ui_event_cbs, event_cb, { + map_foreach_value(&ui_event_cbs, event_cb, { if (event_cb->ext_widgets[i]) { ui_cb_ext[i] = true; break; @@ -723,7 +723,7 @@ void ui_add_cb(uint32_t ns_id, LuaRef cb, bool *ext_widgets) void ui_remove_cb(uint32_t ns_id) { - if (pmap_has(uint32_t)(&ui_event_cbs, ns_id)) { + if (map_has(uint32_t, &ui_event_cbs, ns_id)) { UIEventCallback *item = pmap_del(uint32_t)(&ui_event_cbs, ns_id, NULL); free_ui_event_callback(item); } |