aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy C Eichler <timeyyy_da_man@hotmail.com>2017-10-15 21:51:12 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2019-11-11 19:43:15 +0100
commite757f4d5363125e242f1e680d1f5bb53e8014b06 (patch)
treec0e79029fdf5dc4e88cfb462a24e2465efacb504
parentb9c9283f729c60d98634587190eb14c6bbf428e5 (diff)
downloadrneovim-e757f4d5363125e242f1e680d1f5bb53e8014b06.tar.gz
rneovim-e757f4d5363125e242f1e680d1f5bb53e8014b06.tar.bz2
rneovim-e757f4d5363125e242f1e680d1f5bb53e8014b06.zip
namespace: add ns_initialized func
-rw-r--r--src/nvim/api/private/helpers.c11
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;
+}