diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2016-09-01 18:32:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-01 18:32:37 +0200 |
commit | c6ac4f84b16324b56c38bd2003f037d995262fa1 (patch) | |
tree | 5ece44d718f6511d468ac4fe35030a795044999c /src/nvim/api/ui.c | |
parent | 0ade1bb7067d0cdb9b059fb66a8c4b868408be9c (diff) | |
parent | acb7c826b3df50bd9825baf3b2ffaaa79c8b80df (diff) | |
download | rneovim-c6ac4f84b16324b56c38bd2003f037d995262fa1.tar.gz rneovim-c6ac4f84b16324b56c38bd2003f037d995262fa1.tar.bz2 rneovim-c6ac4f84b16324b56c38bd2003f037d995262fa1.zip |
Merge pull request #4934 from bfredl/api
make the API callable from vimL, rename API functions to common nvim_ prefix
Diffstat (limited to 'src/nvim/api/ui.c')
-rw-r--r-- | src/nvim/api/ui.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/nvim/api/ui.c b/src/nvim/api/ui.c index 2b131443d3..56b41f1eea 100644 --- a/src/nvim/api/ui.c +++ b/src/nvim/api/ui.c @@ -48,6 +48,7 @@ void remote_ui_disconnect(uint64_t channel_id) void nvim_ui_attach(uint64_t channel_id, Integer width, Integer height, Dictionary options, Error *err) + FUNC_API_NOEVAL { if (pmap_has(uint64_t)(connected_uis, channel_id)) { api_set_error(err, Exception, _("UI already attached for channel")); @@ -117,6 +118,7 @@ void ui_attach(uint64_t channel_id, Integer width, Integer height, } void nvim_ui_detach(uint64_t channel_id, Error *err) + FUNC_API_NOEVAL { if (!pmap_has(uint64_t)(connected_uis, channel_id)) { api_set_error(err, Exception, _("UI is not attached for channel")); @@ -125,14 +127,10 @@ void nvim_ui_detach(uint64_t channel_id, Error *err) remote_ui_disconnect(channel_id); } -/// @deprecated -void ui_detach(uint64_t channel_id, Error *err) -{ - nvim_ui_detach(channel_id, err); -} void nvim_ui_try_resize(uint64_t channel_id, Integer width, Integer height, Error *err) + FUNC_API_NOEVAL { if (!pmap_has(uint64_t)(connected_uis, channel_id)) { api_set_error(err, Exception, _("UI is not attached for channel")); @@ -151,15 +149,10 @@ void nvim_ui_try_resize(uint64_t channel_id, Integer width, ui_refresh(); } -/// @deprecated -void ui_try_resize(uint64_t channel_id, Integer width, - Integer height, Error *err) -{ - nvim_ui_try_resize(channel_id, width, height, err); -} - void nvim_ui_set_option(uint64_t channel_id, String name, - Object value, Error *error) { + Object value, Error *error) + FUNC_API_NOEVAL +{ if (!pmap_has(uint64_t)(connected_uis, channel_id)) { api_set_error(error, Exception, _("UI is not attached for channel")); return; |