diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-12-05 23:33:22 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-05 23:33:22 -0500 |
commit | 523f03b506bf577811c0e136bc852cdb89f92c00 (patch) | |
tree | 300f7c7b36f176e593e52c253c6ed2cb25777c49 /src/nvim/eval.c | |
parent | 4306b395defb7ef8f614127e0fbe362656346da3 (diff) | |
download | rneovim-523f03b506bf577811c0e136bc852cdb89f92c00.tar.gz rneovim-523f03b506bf577811c0e136bc852cdb89f92c00.tar.bz2 rneovim-523f03b506bf577811c0e136bc852cdb89f92c00.zip |
lint (#16526)
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 2faae08fc8..78c069c45f 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -4523,7 +4523,7 @@ static int eval_index(char_u **arg, typval_T *rettv, int evaluate, int verbose) * dict.name */ key = *arg + 1; - for (len = 0; ASCII_ISALNUM(key[len]) || key[len] == '_'; ++len) { + for (len = 0; ASCII_ISALNUM(key[len]) || key[len] == '_'; len++) { } if (len == 0) { return FAIL; @@ -6603,8 +6603,9 @@ void common_function(typval_T *argvars, typval_T *rettv, bool is_funcref, FunPtr : (const char *)s)); // Don't check an autoload name for existence here. } else if (trans_name != NULL - && (is_funcref ? find_func(trans_name) == NULL - : !translated_function_exists((const char *)trans_name))) { + && (is_funcref + ? find_func(trans_name) == NULL + : !translated_function_exists((const char *)trans_name))) { semsg(_("E700: Unknown function: %s"), s); } else { int dict_idx = 0; @@ -9649,8 +9650,8 @@ bool var_check_func_name(const char *const name, const bool new_var) { // Allow for w: b: s: and t:. if (!(vim_strchr((char_u *)"wbst", name[0]) != NULL && name[1] == ':') - && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':') ? name[2] - : name[0])) { + && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':') + ? name[2] : name[0])) { semsg(_("E704: Funcref variable name must start with a capital: %s"), name); return false; } |