aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/context.c
diff options
context:
space:
mode:
authorDundar Göc <gocdundar@gmail.com>2022-08-26 23:11:25 +0200
committerdundargoc <gocdundar@gmail.com>2022-11-26 15:52:21 +0100
commitbd22585061b66d7f71d4832b4a81e950b3c9d19d (patch)
tree8c677ace61ab212cef87bc5abbd83c56e50f800d /src/nvim/context.c
parent29b80f6f2e9391b5d78390f65d09f00f73829310 (diff)
downloadrneovim-bd22585061b66d7f71d4832b4a81e950b3c9d19d.tar.gz
rneovim-bd22585061b66d7f71d4832b4a81e950b3c9d19d.tar.bz2
rneovim-bd22585061b66d7f71d4832b4a81e950b3c9d19d.zip
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/context.c')
-rw-r--r--src/nvim/context.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/context.c b/src/nvim/context.c
index 5ea843e023..47e60373bf 100644
--- a/src/nvim/context.c
+++ b/src/nvim/context.c
@@ -263,12 +263,12 @@ static inline void ctx_save_funcs(Context *ctx, bool scriptonly)
Error err = ERROR_INIT;
HASHTAB_ITER(func_tbl_get(), hi, {
- const char_u *const name = hi->hi_key;
+ const char *const name = hi->hi_key;
bool islambda = (STRNCMP(name, "<lambda>", 8) == 0);
- bool isscript = (name[0] == K_SPECIAL);
+ bool isscript = ((uint8_t)name[0] == K_SPECIAL);
if (!islambda && (!scriptonly || isscript)) {
- size_t cmd_len = sizeof("func! ") + STRLEN(name);
+ size_t cmd_len = sizeof("func! ") + strlen(name);
char *cmd = xmalloc(cmd_len);
snprintf(cmd, cmd_len, "func! %s", name);
String func_body = nvim_exec(VIML_INTERNAL_CALL, cstr_as_string(cmd),