diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-03-12 16:52:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-12 16:52:05 +0100 |
commit | d38508d88ab78415368bce350072f9f0f73c15d2 (patch) | |
tree | 03183e664f513fe85d1539eec8e149ed564dbfcc /src/nvim/generators/gen_api_dispatch.lua | |
parent | dc8273f2f1e615cac5cee86709ca4ae6dbd70edf (diff) | |
parent | ed0893698777ae13c06cb3c76a8b7b4b9a967d5f (diff) | |
download | rneovim-d38508d88ab78415368bce350072f9f0f73c15d2.tar.gz rneovim-d38508d88ab78415368bce350072f9f0f73c15d2.tar.bz2 rneovim-d38508d88ab78415368bce350072f9f0f73c15d2.zip |
Merge pull request #13567 from bfredl/termpipe
api: allow open non-current buffer as terminal (+ xmas bonus)
Diffstat (limited to 'src/nvim/generators/gen_api_dispatch.lua')
-rw-r--r-- | src/nvim/generators/gen_api_dispatch.lua | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/nvim/generators/gen_api_dispatch.lua b/src/nvim/generators/gen_api_dispatch.lua index 7e78b9e9d6..d2a7c16186 100644 --- a/src/nvim/generators/gen_api_dispatch.lua +++ b/src/nvim/generators/gen_api_dispatch.lua @@ -104,8 +104,11 @@ for _,f in ipairs(shallowcopy(functions)) do elseif startswith(f.name, "nvim_tabpage_") then ismethod = true end + f.remote = f.remote_only or not f.lua_only + f.lua = f.lua_only or not f.remote_only + f.eval = (not f.lua_only) and (not f.remote_only) else - f.remote_only = true + f.remote = true f.since = 0 f.deprecated_since = 1 end @@ -127,7 +130,8 @@ for _,f in ipairs(shallowcopy(functions)) do newf.return_type = "Object" end newf.impl_name = f.name - newf.remote_only = true + newf.lua = false + newf.eval = false newf.since = 0 newf.deprecated_since = 1 functions[#functions+1] = newf @@ -192,7 +196,7 @@ end -- the real API. for i = 1, #functions do local fn = functions[i] - if fn.impl_name == nil and not fn.lua_only then + if fn.impl_name == nil and fn.remote then local args = {} output:write('Object handle_'..fn.name..'(uint64_t channel_id, Array args, Error *error)') @@ -323,7 +327,7 @@ void msgpack_rpc_init_method_table(void) for i = 1, #functions do local fn = functions[i] - if not fn.lua_only then + if fn.remote then output:write(' msgpack_rpc_add_method_handler('.. '(String) {.data = "'..fn.name..'", '.. '.size = sizeof("'..fn.name..'") - 1}, '.. @@ -492,7 +496,7 @@ local function process_function(fn) end for _, fn in ipairs(functions) do - if not fn.remote_only or fn.name:sub(1, 4) == '_vim' then + if fn.lua or fn.name:sub(1, 4) == '_vim' then process_function(fn) end end |