aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchentau <tchen1998@gmail.com>2021-01-26 16:45:36 -0800
committerchentau <tchen1998@gmail.com>2021-01-26 17:09:35 -0800
commitf0ccac0ba4e386071f2c7581082edca3536360a4 (patch)
treea307c04acfc9ad8579868bf7579b95bb2322cd0d
parentd82688973dfce2fe0d25acb9c9a0c34dc255c893 (diff)
downloadrneovim-f0ccac0ba4e386071f2c7581082edca3536360a4.tar.gz
rneovim-f0ccac0ba4e386071f2c7581082edca3536360a4.tar.bz2
rneovim-f0ccac0ba4e386071f2c7581082edca3536360a4.zip
lint
-rw-r--r--src/nvim/ex_docmd.c14
-rw-r--r--src/nvim/lua/executor.c5
-rw-r--r--test/functional/lua/command_line_completion_spec.lua1
3 files changed, 12 insertions, 8 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index c1f0c09377..18683c54d3 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -3041,9 +3041,10 @@ const char * set_one_cmd_context(
p = arg + 1;
arg = (const char *)skip_cmd_arg((char_u *)arg, false);
- /* Still touching the command after '+'? */
- if (*arg == NUL)
+ // Still touching the command after '+'?
+ if (*arg == NUL) {
return p;
+ }
// Skip space(s) after +command to get to the real argument.
arg = (const char *)skipwhite((const char_u *)arg);
@@ -3972,7 +3973,7 @@ static linenr_T get_address(exarg_T *eap,
break;
default:
- if (ascii_isdigit(*cmd)) { // absolute line number
+ if (ascii_isdigit(*cmd)) { // absolute line number
lnum = getdigits_long(&cmd, false, 0);
}
}
@@ -5405,8 +5406,8 @@ static int uc_scan_attr(char_u *attr, size_t len, uint32_t *argt, long *def,
size_t vallen = 0;
size_t attrlen = len;
- /* Look for the attribute name - which is the part before any '=' */
- for (i = 0; i < (int)len; ++i) {
+ // Look for the attribute name - which is the part before any '='
+ for (i = 0; i < (int)len; i++) {
if (attr[i] == '=') {
val = &attr[i + 1];
vallen = len - i - 1;
@@ -7508,8 +7509,9 @@ static void ex_read(exarg_T *eap)
}
if (*eap->arg == NUL) {
- if (check_fname() == FAIL) /* check for no file name */
+ if (check_fname() == FAIL) { // check for no file name
return;
+ }
i = readfile(curbuf->b_ffname, curbuf->b_fname,
eap->line2, (linenr_T)0, (linenr_T)MAXLNUM, eap, 0);
} else {
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c
index cefb0ee429..310b194c8c 100644
--- a/src/nvim/lua/executor.c
+++ b/src/nvim/lua/executor.c
@@ -1292,7 +1292,10 @@ static void nlua_add_treesitter(lua_State *const lstate) FUNC_ATTR_NONNULL_ALL
lua_setfield(lstate, -2, "_ts_parse_query");
}
-int nlua_expand_pat(expand_T *xp, char_u *pat, int *num_results, char_u ***results)
+int nlua_expand_pat(expand_T *xp,
+ char_u *pat,
+ int *num_results,
+ char_u ***results)
{
lua_State *const lstate = nlua_enter();
int ret = OK;
diff --git a/test/functional/lua/command_line_completion_spec.lua b/test/functional/lua/command_line_completion_spec.lua
index 31cd5cf02f..3ba7e1589f 100644
--- a/test/functional/lua/command_line_completion_spec.lua
+++ b/test/functional/lua/command_line_completion_spec.lua
@@ -2,7 +2,6 @@ local helpers = require('test.functional.helpers')(after_each)
local clear = helpers.clear
local eq = helpers.eq
-local funcs = helpers.funcs
local exec_lua = helpers.exec_lua
local get_completions = function(input, env)