diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2016-06-20 14:40:57 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2016-08-31 21:57:06 +0200 |
commit | e536abc1e1f59d1ac012e1be576bf55175e95443 (patch) | |
tree | c9ba9c5772f4e0551ccf309f1ac269678ebf77a8 /src/nvim/api/ui.c | |
parent | 7e2348f2b1b487c875bbcf6c6711a276f9063040 (diff) | |
download | rneovim-e536abc1e1f59d1ac012e1be576bf55175e95443.tar.gz rneovim-e536abc1e1f59d1ac012e1be576bf55175e95443.tar.bz2 rneovim-e536abc1e1f59d1ac012e1be576bf55175e95443.zip |
api: Allow blacklist functions that shouldn't be accesible from eval
Blacklist deprecated functions and functions depending on channel_id
Diffstat (limited to 'src/nvim/api/ui.c')
-rw-r--r-- | src/nvim/api/ui.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/api/ui.c b/src/nvim/api/ui.c index 2b131443d3..5426ccc8aa 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")); @@ -133,6 +135,7 @@ void ui_detach(uint64_t channel_id, Error *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")); @@ -159,7 +162,9 @@ void ui_try_resize(uint64_t channel_id, Integer width, } 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; |