aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/msgpack_rpc
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2015-02-13 12:06:01 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2015-02-16 23:17:39 -0300
commite0e41b30c61922e099a067ac5c137e745699a1aa (patch)
treed4cbc2313612e5f6bc135ceb8cf520cd19b89b20 /src/nvim/msgpack_rpc
parent6383ea6e8e14350432f1fc7da519b54d0ed67f8c (diff)
downloadrneovim-e0e41b30c61922e099a067ac5c137e745699a1aa.tar.gz
rneovim-e0e41b30c61922e099a067ac5c137e745699a1aa.tar.bz2
rneovim-e0e41b30c61922e099a067ac5c137e745699a1aa.zip
ui: Remove/adapt some old code for a big UI refactor
- Remove abstract_ui global, now it is always active - Remove some terminal handling code - Remove unused functions - Remove HAVE_TGETENT/TERMINFO/TERMIOS/IOCTL #ifdefs - Remove tgetent/terminfo from version.c - Remove curses/terminfo dependencies - Only start/stop termcap when starting/exiting the program - msg_use_printf will return true if there are no attached UIs( messages will be written to stdout) - Remove `ex_winpos`(implement `:winpos` with `ex_ni`)
Diffstat (limited to 'src/nvim/msgpack_rpc')
-rw-r--r--src/nvim/msgpack_rpc/channel.c16
-rw-r--r--src/nvim/msgpack_rpc/helpers.c16
2 files changed, 2 insertions, 30 deletions
diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c
index 7ae45ee84a..58c181e4de 100644
--- a/src/nvim/msgpack_rpc/channel.c
+++ b/src/nvim/msgpack_rpc/channel.c
@@ -103,9 +103,7 @@ void channel_init(void)
channel_from_stdio();
}
- if (abstract_ui) {
- remote_ui_init();
- }
+ remote_ui_init();
}
/// Teardown the module
@@ -176,13 +174,6 @@ void channel_from_stream(uv_stream_t *stream)
channel->data.streams.uv = stream;
}
-bool channel_exists(uint64_t id)
-{
- Channel *channel;
- return (channel = pmap_get(uint64_t)(channels, id)) != NULL
- && !channel->closed;
-}
-
/// Sends event/arguments to channel
///
/// @param id The channel id. If 0, the event will be sent to all
@@ -665,10 +656,7 @@ static void on_stdio_close(Event e)
static void free_channel(Channel *channel)
{
- if (abstract_ui) {
- remote_ui_disconnect(channel->id);
- }
-
+ remote_ui_disconnect(channel->id);
pmap_del(uint64_t)(channels, channel->id);
msgpack_unpacker_free(channel->unpacker);
diff --git a/src/nvim/msgpack_rpc/helpers.c b/src/nvim/msgpack_rpc/helpers.c
index 54e8b83cd0..355176aa5f 100644
--- a/src/nvim/msgpack_rpc/helpers.c
+++ b/src/nvim/msgpack_rpc/helpers.c
@@ -295,22 +295,6 @@ void msgpack_rpc_from_dictionary(Dictionary result, msgpack_packer *res)
}
}
-/// Finishes the msgpack-rpc call with an error message.
-///
-/// @param msg The error message
-/// @param res A packer that contains the response
-void msgpack_rpc_error(char *msg, msgpack_packer *res)
- FUNC_ATTR_NONNULL_ALL
-{
- size_t len = strlen(msg);
-
- // error message
- msgpack_pack_bin(res, len);
- msgpack_pack_bin_body(res, msg, len);
- // Nil result
- msgpack_pack_nil(res);
-}
-
/// Handler executed when an invalid method name is passed
Object msgpack_rpc_handle_missing_method(uint64_t channel_id,
uint64_t request_id,