diff options
-rw-r--r-- | src/nvim/eval.c | 11 | ||||
-rw-r--r-- | src/nvim/globals.h | 2 | ||||
-rw-r--r-- | src/nvim/main.c | 2 | ||||
-rw-r--r-- | test/functional/api/buffer_spec.lua | 1 | ||||
-rw-r--r-- | test/functional/eval/changedtick_spec.lua | 3 |
5 files changed, 8 insertions, 11 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index d5586b4630..4881b031e3 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -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)); diff --git a/src/nvim/globals.h b/src/nvim/globals.h index 6b3752c98c..1e0dfcd441 100644 --- a/src/nvim/globals.h +++ b/src/nvim/globals.h @@ -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")); diff --git a/src/nvim/main.c b/src/nvim/main.c index f962a82a74..d7baa7acfa 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -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; diff --git a/test/functional/api/buffer_spec.lua b/test/functional/api/buffer_spec.lua index e58ae440cf..e7e2168238 100644 --- a/test/functional/api/buffer_spec.lua +++ b/test/functional/api/buffer_spec.lua @@ -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 diff --git a/test/functional/eval/changedtick_spec.lua b/test/functional/eval/changedtick_spec.lua index f443f31bc0..60ea9fa12b 100644 --- a/test/functional/eval/changedtick_spec.lua +++ b/test/functional/eval/changedtick_spec.lua @@ -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')) |