diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-01-09 09:51:11 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-01-12 09:47:41 -0300 |
commit | d992213678ecd14902ae74ff765e682fb76d5ad9 (patch) | |
tree | 4d168ce56813e7ffd588606ca1243665e92ea66a /src/nvim/ex_docmd.c | |
parent | abc147a9775ef7de221443ff68ddfbc8ff6e0177 (diff) | |
download | rneovim-d992213678ecd14902ae74ff765e682fb76d5ad9.tar.gz rneovim-d992213678ecd14902ae74ff765e682fb76d5ad9.tar.bz2 rneovim-d992213678ecd14902ae74ff765e682fb76d5ad9.zip |
ui: Reimplement `:suspend` command for remote UIs.
- Remove suspend method from the UI protocol
- Handle `:suspend` by disconnecting the last channel that sent a request to
nvim.
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index ca79270fcc..5dae96d774 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -71,6 +71,7 @@ #include "nvim/os/time.h" #include "nvim/ex_cmds_defs.h" #include "nvim/mouse.h" +#include "nvim/msgpack_rpc/channel.h" static int quitmore = 0; static int ex_pressedreturn = FALSE; @@ -5398,10 +5399,16 @@ static void ex_stop(exarg_T *eap) /* * Disallow suspending for "rvim". */ - if (!check_restricted() - ) { - if (!eap->forceit) + if (!check_restricted()) { + if (!eap->forceit) { autowrite_all(); + } + + if (abstract_ui) { + channel_close(last_message_source); + return; + } + windgoto((int)Rows - 1, 0); out_char('\n'); out_flush(); |