mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
*: Fix linter errors
This commit is contained in:
parent
858ac9d8e5
commit
9c1865c7f8
@ -171,7 +171,7 @@ static char *e_nofunc = N_("E130: Unknown function: %s");
|
||||
static char *e_illvar = N_("E461: Illegal variable name: %s");
|
||||
static char *e_float_as_string = N_("E806: using Float as a String");
|
||||
static const char *e_readonlyvar = N_(
|
||||
"E46: Cannot change read-only variable \"%.*s\"");
|
||||
"E46: Cannot change read-only variable \"%.*s\"");
|
||||
|
||||
static char_u * const empty_string = (char_u *)"";
|
||||
static char_u * const namespace_char = (char_u *)"abglstvw";
|
||||
@ -3157,11 +3157,12 @@ 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;
|
||||
}
|
||||
@ -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,8 +12455,8 @@ 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,
|
||||
GLV_NO_AUTOLOAD|GLV_READ_ONLY, FNE_CHECK_START);
|
||||
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)
|
||||
EMSG(_(e_trailing));
|
||||
|
@ -1172,7 +1172,7 @@ EXTERN char_u e_loclist[] INIT(= N_("E776: No location list"));
|
||||
EXTERN char_u e_re_damg[] INIT(= N_("E43: Damaged match string"));
|
||||
EXTERN char_u e_re_corr[] INIT(= N_("E44: Corrupted regexp program"));
|
||||
EXTERN char_u e_readonly[] INIT(= N_(
|
||||
"E45: 'readonly' option is set (add ! to override)"));
|
||||
"E45: 'readonly' option is set (add ! to override)"));
|
||||
EXTERN char_u e_readerrf[] INIT(= N_("E47: Error while reading errorfile"));
|
||||
EXTERN char_u e_sandbox[] INIT(= N_("E48: Not allowed in sandbox"));
|
||||
EXTERN char_u e_secure[] INIT(= N_("E523: Not allowed here"));
|
||||
|
@ -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'))
|
||||
|
Loading…
Reference in New Issue
Block a user