diff options
author | Timothy C Eichler <timeyyy_da_man@hotmail.com> | 2017-10-15 21:51:12 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2019-11-11 19:43:15 +0100 |
commit | e757f4d5363125e242f1e680d1f5bb53e8014b06 (patch) | |
tree | c0e79029fdf5dc4e88cfb462a24e2465efacb504 | |
parent | b9c9283f729c60d98634587190eb14c6bbf428e5 (diff) | |
download | rneovim-e757f4d5363125e242f1e680d1f5bb53e8014b06.tar.gz rneovim-e757f4d5363125e242f1e680d1f5bb53e8014b06.tar.bz2 rneovim-e757f4d5363125e242f1e680d1f5bb53e8014b06.zip |
namespace: add ns_initialized func
-rw-r--r-- | src/nvim/api/private/helpers.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c index 2056cb07e3..b54fc9207e 100644 --- a/src/nvim/api/private/helpers.c +++ b/src/nvim/api/private/helpers.c @@ -10,6 +10,7 @@ #include "nvim/api/private/helpers.h" #include "nvim/api/private/defs.h" #include "nvim/api/private/handle.h" +#include "nvim/api/vim.h" #include "nvim/msgpack_rpc/helpers.h" #include "nvim/lua/executor.h" #include "nvim/ascii.h" @@ -1505,3 +1506,13 @@ ArrayOf(Dictionary) keymap_array(String mode, buf_T *buf) return mappings; } + + +// Is the Namespace in use? +bool ns_initialized(uint64_t ns) +{ + if (ns < 1) { + return false; + } + return ns < (uint64_t)next_namespace_id; +} |