aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/autocmd.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-08-22 11:25:59 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2021-08-22 11:28:47 +0200
commitc265fd31ab2b0307650ad94e1ea272e9360c345f (patch)
tree9ca3efcc04236190d15a418e1ff0a2ca1d4d6a1c /src/nvim/autocmd.c
parentb888018aed249174aad7586859ac5142f1a3ef10 (diff)
downloadrneovim-c265fd31ab2b0307650ad94e1ea272e9360c345f.tar.gz
rneovim-c265fd31ab2b0307650ad94e1ea272e9360c345f.tar.bz2
rneovim-c265fd31ab2b0307650ad94e1ea272e9360c345f.zip
refactor(api): remove unneccesary indirection around handles
These things are just maps to pointers, no need to perform a huge song and dance around it.
Diffstat (limited to 'src/nvim/autocmd.c')
-rw-r--r--src/nvim/autocmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/autocmd.c b/src/nvim/autocmd.c
index bec9808183..417953eb14 100644
--- a/src/nvim/autocmd.c
+++ b/src/nvim/autocmd.c
@@ -5,7 +5,7 @@
#include "nvim/autocmd.h"
-#include "nvim/api/private/handle.h"
+#include "nvim/api/private/helpers.h"
#include "nvim/ascii.h"
#include "nvim/buffer.h"
#include "nvim/charset.h"
@@ -1150,7 +1150,7 @@ void aucmd_prepbuf(aco_save_T *aco, buf_T *buf)
block_autocmds(); // We don't want BufEnter/WinEnter autocommands.
if (need_append) {
win_append(lastwin, aucmd_win);
- handle_register_window(aucmd_win);
+ pmap_put(handle_T)(&window_handles, aucmd_win->handle, aucmd_win);
win_config_float(aucmd_win, aucmd_win->w_float_config);
}
// Prevent chdir() call in win_enter_ext(), through do_autochdir()
@@ -1191,7 +1191,7 @@ void aucmd_restbuf(aco_save_T *aco)
win_found:
win_remove(curwin, NULL);
- handle_unregister_window(curwin);
+ pmap_del(handle_T)(&window_handles, curwin->handle);
if (curwin->w_grid_alloc.chars != NULL) {
ui_comp_remove_grid(&curwin->w_grid_alloc);
ui_call_win_hide(curwin->w_grid_alloc.handle);