diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-09-11 18:44:20 -0700 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-09-12 17:04:05 -0700 |
commit | 6dd56d09025c960ef36952e3d4a1f77779782c52 (patch) | |
tree | 4619033c696a2ea5442e85a1f570ebf223541f86 /src/nvim/ui_bridge.c | |
parent | e9cf515888705640ebd754483349f2bf84c32255 (diff) | |
download | rneovim-6dd56d09025c960ef36952e3d4a1f77779782c52.tar.gz rneovim-6dd56d09025c960ef36952e3d4a1f77779782c52.tar.bz2 rneovim-6dd56d09025c960ef36952e3d4a1f77779782c52.zip |
UIAttach, UIDetach
doc: ginit.vim, gvimrc
fix #3656
Diffstat (limited to 'src/nvim/ui_bridge.c')
-rw-r--r-- | src/nvim/ui_bridge.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/nvim/ui_bridge.c b/src/nvim/ui_bridge.c index be76a8b047..a64e691b6d 100644 --- a/src/nvim/ui_bridge.c +++ b/src/nvim/ui_bridge.c @@ -17,8 +17,6 @@ #include "nvim/ui_bridge.h" #include "nvim/ugrid.h" #include "nvim/api/private/helpers.h" -#include "nvim/fileio.h" -#include "nvim/eval.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "ui_bridge.c.generated.h" @@ -87,13 +85,7 @@ UI *ui_bridge_attach(UI *ui, ui_main_fn ui_main, event_scheduler scheduler) } uv_mutex_unlock(&rv->mutex); - ui_attach_impl(&rv->bridge); - - dict_T *dict = get_vim_var_dict(VV_EVENT); - tv_dict_add_nr(dict, S_LEN("chan"), 0); - tv_dict_set_keys_readonly(dict); - apply_autocmds(EVENT_UIATTACH, NULL, NULL, false, curbuf); - tv_dict_clear(dict); + ui_attach_impl(&rv->bridge, 0); return &rv->bridge; } @@ -115,13 +107,7 @@ static void ui_bridge_stop(UI *b) { // Detach bridge first, so that "stop" is the last event the TUI loop // receives from the main thread. #8041 - ui_detach_impl(b); - - dict_T *dict = get_vim_var_dict(VV_EVENT); - tv_dict_add_nr(dict, S_LEN("chan"), 0); - tv_dict_set_keys_readonly(dict); - apply_autocmds(EVENT_UIDETACH, NULL, NULL, false, curbuf); - tv_dict_clear(dict); + ui_detach_impl(b, 0); UIBridgeData *bridge = (UIBridgeData *)b; bool stopped = bridge->stopped = false; |