diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-09-12 16:08:22 -0700 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-09-12 17:04:05 -0700 |
commit | 589f612adfea22b688618fa90e011f5494ca5204 (patch) | |
tree | 05d55149f75fc76e5045ccccabf242e1955ca5fd /src | |
parent | 44d45e29ea4a632e66ac63d25d355a5a4c7178bc (diff) | |
download | rneovim-589f612adfea22b688618fa90e011f5494ca5204.tar.gz rneovim-589f612adfea22b688618fa90e011f5494ca5204.tar.bz2 rneovim-589f612adfea22b688618fa90e011f5494ca5204.zip |
rename: UIAttach/UIDetach => UIEnter/UILeave
"enter"/"leave" is more conventional for Vim events, and
"attach"/"detach" distinction does not gain much.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/aucmd.c | 4 | ||||
-rw-r--r-- | src/nvim/auevents.lua | 8 | ||||
-rw-r--r-- | src/nvim/ui.c | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/aucmd.c b/src/nvim/aucmd.c index 5188f96a5d..a9a7d834a4 100644 --- a/src/nvim/aucmd.c +++ b/src/nvim/aucmd.c @@ -13,7 +13,7 @@ # include "aucmd.c.generated.h" #endif -void do_autocmd_uiattach(uint64_t chanid, bool attached) +void do_autocmd_uienter(uint64_t chanid, bool attached) { static bool recursive = false; @@ -26,7 +26,7 @@ void do_autocmd_uiattach(uint64_t chanid, bool attached) assert(chanid < VARNUMBER_MAX); tv_dict_add_nr(dict, S_LEN("chan"), (varnumber_T)chanid); tv_dict_set_keys_readonly(dict); - apply_autocmds(attached ? EVENT_UIATTACH : EVENT_UIDETACH, + apply_autocmds(attached ? EVENT_UIENTER : EVENT_UILEAVE, NULL, NULL, false, curbuf); tv_dict_clear(dict); diff --git a/src/nvim/auevents.lua b/src/nvim/auevents.lua index 1505b984ad..c808af37b1 100644 --- a/src/nvim/auevents.lua +++ b/src/nvim/auevents.lua @@ -96,8 +96,8 @@ return { 'TextChangedI', -- text was modified in Insert mode(no popup) 'TextChangedP', -- text was modified in Insert mode(popup) 'TextYankPost', -- after a yank or delete was done (y, d, c) - 'UIAttach', -- after a UI attached - 'UIDetach', -- after a UI detaches + 'UIEnter', -- after UI attaches + 'UILeave', -- after UI detaches 'User', -- user defined autocommand 'VimEnter', -- after starting Vim 'VimLeave', -- before exiting Vim @@ -125,7 +125,7 @@ return { TabNewEntered=true, TermClose=true, TermOpen=true, - UIAttach=true, - UIDetach=true, + UIEnter=true, + UILeave=true, }, } diff --git a/src/nvim/ui.c b/src/nvim/ui.c index 9ff2381189..79fa8b8223 100644 --- a/src/nvim/ui.c +++ b/src/nvim/ui.c @@ -296,7 +296,7 @@ void ui_attach_impl(UI *ui, uint64_t chanid) bool is_compositor = (ui == uis[0]); if (!is_compositor) { - do_autocmd_uiattach(chanid, true); + do_autocmd_uienter(chanid, true); } } @@ -333,7 +333,7 @@ void ui_detach_impl(UI *ui, uint64_t chanid) ui_comp_detach(ui); } - do_autocmd_uiattach(chanid, false); + do_autocmd_uienter(chanid, false); } void ui_set_ext_option(UI *ui, UIExtension ext, bool active) |