diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-09-12 16:43:52 -0700 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-09-12 17:04:05 -0700 |
commit | 492ac04f7e0ffcc5011d3604b234d149f8b0bb91 (patch) | |
tree | c028665f67fc7b9f9d8b576fa8c46157245016d3 /src | |
parent | 589f612adfea22b688618fa90e011f5494ca5204 (diff) | |
download | rneovim-492ac04f7e0ffcc5011d3604b234d149f8b0bb91.tar.gz rneovim-492ac04f7e0ffcc5011d3604b234d149f8b0bb91.tar.bz2 rneovim-492ac04f7e0ffcc5011d3604b234d149f8b0bb91.zip |
UIEnter/UILeave: fire for embedder UI, builtin TUI
Before this, --embed UIs (without --headless) would not trigger UIEnter.
For TUI, maybe UIEnter isn't useful, but:
- It is less "surprising"/special.
- Makes documentation simpler.
- When TUI becomes a coprocess, it will happen anyway.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index bca8991b0f..e7835ccbf1 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -12,6 +12,7 @@ #include "nvim/ascii.h" #include "nvim/vim.h" #include "nvim/main.h" +#include "nvim/aucmd.h" #include "nvim/buffer.h" #include "nvim/charset.h" #include "nvim/diff.h" @@ -351,7 +352,7 @@ int main(int argc, char **argv) bool use_remote_ui = (embedded_mode && !headless_mode); bool use_builtin_ui = (!headless_mode && !embedded_mode && !silent_mode); if (use_remote_ui || use_builtin_ui) { - TIME_MSG("waiting for UI to make request"); + TIME_MSG("waiting for UI"); if (use_remote_ui) { remote_ui_wait_for_attach(); } else { @@ -537,6 +538,10 @@ int main(int argc, char **argv) set_vim_var_nr(VV_VIM_DID_ENTER, 1L); apply_autocmds(EVENT_VIMENTER, NULL, NULL, false, curbuf); TIME_MSG("VimEnter autocommands"); + if (use_remote_ui || use_builtin_ui) { + do_autocmd_uienter(use_remote_ui ? CHAN_STDIO : 0, true); + TIME_MSG("UIEnter autocommands"); + } // Adjust default register name for "unnamed" in 'clipboard'. Can only be // done after the clipboard is available and all initial commands that may |