mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 08:48:16 +00:00
*: Fix linter errors
This commit is contained in:
@@ -3157,12 +3157,13 @@ static void item_lock(typval_T *tv, int deep, int lock)
|
||||
list_T *const l = tv->vval.v_list;
|
||||
if (l != NULL) {
|
||||
CHANGE_LOCK(l->lv_lock, lock);
|
||||
if (deep < 0 || deep > 1)
|
||||
if (deep < 0 || deep > 1) {
|
||||
// Recursive: lock/unlock the items the List contains.
|
||||
for (listitem_T *li = l->lv_first; li != NULL; li = li->li_next) {
|
||||
item_lock(&li->li_tv, deep - 1, lock);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VAR_DICT: {
|
||||
@@ -12396,7 +12397,7 @@ static void f_insert(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
long before = 0;
|
||||
listitem_T *item;
|
||||
list_T *l;
|
||||
int error = FALSE;
|
||||
int error = false;
|
||||
const char *const arg_errmsg = _("insert() argument");
|
||||
const size_t arg_errmsg_len = strlen(arg_errmsg);
|
||||
|
||||
@@ -12454,7 +12455,7 @@ static void f_islocked(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
dictitem_T *di;
|
||||
|
||||
rettv->vval.v_number = -1;
|
||||
end = get_lval(get_tv_string(&argvars[0]), NULL, &lv, FALSE, FALSE,
|
||||
end = get_lval(get_tv_string(&argvars[0]), NULL, &lv, false, false,
|
||||
GLV_NO_AUTOLOAD|GLV_READ_ONLY, FNE_CHECK_START);
|
||||
if (end != NULL && lv.ll_name != NULL) {
|
||||
if (*end != NUL)
|
||||
|
@@ -576,7 +576,7 @@ void getout(int exitval)
|
||||
buf_T *buf = wp->w_buffer;
|
||||
if (buf->b_changedtick != -1) {
|
||||
apply_autocmds(EVENT_BUFWINLEAVE, buf->b_fname,
|
||||
buf->b_fname, FALSE, buf);
|
||||
buf->b_fname, false, buf);
|
||||
buf_set_changedtick(buf, -1); // note that we did it already
|
||||
// start all over, autocommands may mess up the lists
|
||||
next_tp = first_tabpage;
|
||||
|
@@ -4,7 +4,6 @@ local curbuf, curwin, eq = helpers.curbuf, helpers.curwin, helpers.eq
|
||||
local curbufmeths, ok = helpers.curbufmeths, helpers.ok
|
||||
local funcs = helpers.funcs
|
||||
local request = helpers.request
|
||||
local neq = helpers.neq
|
||||
local NIL = helpers.NIL
|
||||
local meth_pcall = helpers.meth_pcall
|
||||
local command = helpers.command
|
||||
|
@@ -1,7 +1,6 @@
|
||||
local helpers = require('test.functional.helpers')(after_each)
|
||||
|
||||
local eq = helpers.eq
|
||||
local neq = helpers.neq
|
||||
local eval = helpers.eval
|
||||
local feed = helpers.feed
|
||||
local clear = helpers.clear
|
||||
@@ -15,8 +14,6 @@ local curbufmeths = helpers.curbufmeths
|
||||
|
||||
before_each(clear)
|
||||
|
||||
local function preinc(t, v) t.value = t.value + (v or 1) return t.value end
|
||||
|
||||
local function changedtick()
|
||||
local ct = curbufmeths.get_changedtick()
|
||||
eq(ct, curbufmeths.get_var('changedtick'))
|
||||
|
Reference in New Issue
Block a user