aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/api/ui.c2
-rw-r--r--src/nvim/eval.c56
-rw-r--r--src/nvim/eval.h8
-rw-r--r--src/nvim/ex_cmds2.c2
-rw-r--r--src/nvim/hardcopy.c44
-rw-r--r--src/nvim/hashtab.c3
-rw-r--r--src/nvim/main.c2
-rw-r--r--src/nvim/screen.c37
-rw-r--r--src/nvim/testdir/runtest.vim6
-rw-r--r--src/nvim/testdir/test_alot.vim2
-rw-r--r--src/nvim/testdir/test_expr.vim14
-rw-r--r--src/nvim/testdir/test_hardcopy.vim4
-rw-r--r--src/nvim/testdir/test_statusline.vim39
-rw-r--r--src/nvim/testdir/test_tabline.vim43
-rw-r--r--src/nvim/testdir/test_viml.vim8
-rw-r--r--src/nvim/tui/tui.c4
-rw-r--r--src/nvim/ui.c11
-rw-r--r--src/nvim/version.c22
-rw-r--r--src/nvim/vim.h8
19 files changed, 247 insertions, 68 deletions
diff --git a/src/nvim/api/ui.c b/src/nvim/api/ui.c
index 56b41f1eea..9178538110 100644
--- a/src/nvim/api/ui.c
+++ b/src/nvim/api/ui.c
@@ -271,6 +271,8 @@ static void remote_ui_mode_change(UI *ui, int mode)
ADD(args, STRING_OBJ(cstr_to_string("insert")));
} else if (mode == REPLACE) {
ADD(args, STRING_OBJ(cstr_to_string("replace")));
+ } else if (mode == CMDLINE) {
+ ADD(args, STRING_OBJ(cstr_to_string("cmdline")));
} else {
assert(mode == NORMAL);
ADD(args, STRING_OBJ(cstr_to_string("normal")));
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 88464b8cb0..8e8d36b442 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -387,6 +387,14 @@ static struct vimvar {
VV(VV__NULL_LIST, "_null_list", VAR_LIST, VV_RO),
VV(VV__NULL_DICT, "_null_dict", VAR_DICT, VV_RO),
VV(VV_VIM_DID_ENTER, "vim_did_enter", VAR_NUMBER, VV_RO),
+ VV(VV_TYPE_NUMBER, "t_number", VAR_NUMBER, VV_RO),
+ VV(VV_TYPE_STRING, "t_string", VAR_NUMBER, VV_RO),
+ VV(VV_TYPE_FUNC, "t_func", VAR_NUMBER, VV_RO),
+ VV(VV_TYPE_LIST, "t_list", VAR_NUMBER, VV_RO),
+ VV(VV_TYPE_DICT, "t_dict", VAR_NUMBER, VV_RO),
+ VV(VV_TYPE_FLOAT, "t_float", VAR_NUMBER, VV_RO),
+ VV(VV_TYPE_BOOL, "t_bool", VAR_NUMBER, VV_RO),
+ VV(VV_EXITING, "exiting", VAR_NUMBER, VV_RO),
};
#undef VV
@@ -400,7 +408,7 @@ static struct vimvar {
#define vv_dict vv_di.di_tv.vval.v_dict
#define vv_tv vv_di.di_tv
-static dictitem_T vimvars_var; /* variable used for v: */
+static dictitem_T vimvars_var; // variable used for v:
#define vimvarht vimvardict.dv_hashtab
typedef struct {
@@ -563,10 +571,18 @@ void eval_init(void)
set_vim_var_nr(VV_SEARCHFORWARD, 1L);
set_vim_var_nr(VV_HLSEARCH, 1L);
set_vim_var_nr(VV_COUNT1, 1);
+ set_vim_var_nr(VV_TYPE_NUMBER, VAR_TYPE_NUMBER);
+ set_vim_var_nr(VV_TYPE_STRING, VAR_TYPE_STRING);
+ set_vim_var_nr(VV_TYPE_FUNC, VAR_TYPE_FUNC);
+ set_vim_var_nr(VV_TYPE_LIST, VAR_TYPE_LIST);
+ set_vim_var_nr(VV_TYPE_DICT, VAR_TYPE_DICT);
+ set_vim_var_nr(VV_TYPE_FLOAT, VAR_TYPE_FLOAT);
+ set_vim_var_nr(VV_TYPE_BOOL, VAR_TYPE_BOOL);
set_vim_var_special(VV_FALSE, kSpecialVarFalse);
set_vim_var_special(VV_TRUE, kSpecialVarTrue);
set_vim_var_special(VV_NULL, kSpecialVarNull);
+ set_vim_var_special(VV_EXITING, kSpecialVarNull);
set_reg_var(0); // default for v:register is not 0 but '"'
}
@@ -2146,11 +2162,9 @@ get_lval (
if (lp->ll_tv->v_type == VAR_DICT) {
if (len == -1) {
- /* "[key]": get key from "var1" */
- key = get_tv_string(&var1); /* is number or string */
- if (*key == NUL) {
- if (!quiet)
- EMSG(_(e_emptykey));
+ // "[key]": get key from "var1"
+ key = get_tv_string_chk(&var1); // is number or string
+ if (key == NULL) {
clear_tv(&var1);
return NULL;
}
@@ -4601,10 +4615,8 @@ eval_index (
dictitem_T *item;
if (len == -1) {
- key = get_tv_string(&var1);
- if (*key == NUL) {
- if (verbose)
- EMSG(_(e_emptykey));
+ key = get_tv_string_chk(&var1);
+ if (key == NULL) {
clear_tv(&var1);
return FAIL;
}
@@ -6588,10 +6600,8 @@ static int get_dict_tv(char_u **arg, typval_T *rettv, int evaluate)
}
if (evaluate) {
key = get_tv_string_buf_chk(&tvkey, buf);
- if (key == NULL || *key == NUL) {
- /* "key" is NULL when get_tv_string_buf_chk() gave an errmsg */
- if (key != NULL)
- EMSG(_(e_emptykey));
+ if (key == NULL) {
+ // "key" is NULL when get_tv_string_buf_chk() gave an errmsg
clear_tv(&tvkey);
goto failret;
}
@@ -16801,17 +16811,17 @@ static void f_type(typval_T *argvars, typval_T *rettv, FunPtr fptr)
int n = -1;
switch (argvars[0].v_type) {
- case VAR_NUMBER: n = 0; break;
- case VAR_STRING: n = 1; break;
- case VAR_FUNC: n = 2; break;
- case VAR_LIST: n = 3; break;
- case VAR_DICT: n = 4; break;
- case VAR_FLOAT: n = 5; break;
+ case VAR_NUMBER: n = VAR_TYPE_NUMBER; break;
+ case VAR_STRING: n = VAR_TYPE_STRING; break;
+ case VAR_FUNC: n = VAR_TYPE_FUNC; break;
+ case VAR_LIST: n = VAR_TYPE_LIST; break;
+ case VAR_DICT: n = VAR_TYPE_DICT; break;
+ case VAR_FLOAT: n = VAR_TYPE_FLOAT; break;
case VAR_SPECIAL: {
switch (argvars[0].vval.v_special) {
case kSpecialVarTrue:
case kSpecialVarFalse: {
- n = 6;
+ n = VAR_TYPE_BOOL;
break;
}
case kSpecialVarNull: {
@@ -17755,6 +17765,8 @@ void set_vcount(long count, long count1, int set_prevcount)
/// @param[in] val Value to set to.
void set_vim_var_nr(const VimVarIndex idx, const varnumber_T val)
{
+ clear_tv(&vimvars[idx].vv_tv);
+ vimvars[idx].vv_type = VAR_NUMBER;
vimvars[idx].vv_nr = val;
}
@@ -17764,6 +17776,8 @@ void set_vim_var_nr(const VimVarIndex idx, const varnumber_T val)
/// @param[in] val Value to set to.
void set_vim_var_special(const VimVarIndex idx, const SpecialVarValue val)
{
+ clear_tv(&vimvars[idx].vv_tv);
+ vimvars[idx].vv_type = VAR_SPECIAL;
vimvars[idx].vv_special = val;
}
diff --git a/src/nvim/eval.h b/src/nvim/eval.h
index 1061840816..630e309442 100644
--- a/src/nvim/eval.h
+++ b/src/nvim/eval.h
@@ -127,6 +127,14 @@ typedef enum {
VV__NULL_LIST, // List with NULL value. For test purposes only.
VV__NULL_DICT, // Dictionary with NULL value. For test purposes only.
VV_VIM_DID_ENTER,
+ VV_TYPE_NUMBER,
+ VV_TYPE_STRING,
+ VV_TYPE_FUNC,
+ VV_TYPE_LIST,
+ VV_TYPE_DICT,
+ VV_TYPE_FLOAT,
+ VV_TYPE_BOOL,
+ VV_EXITING,
} VimVarIndex;
/// All recognized msgpack types
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c
index f68663c60c..3b92b3734a 100644
--- a/src/nvim/ex_cmds2.c
+++ b/src/nvim/ex_cmds2.c
@@ -2552,7 +2552,7 @@ static void add_pack_plugin(char_u *fname, void *cookie)
}
if (cookie != &APP_ADD_DIR) {
- static const char *plugpat = "%s/plugin/*.vim"; // NOLINT
+ static const char *plugpat = "%s/plugin/**/*.vim"; // NOLINT
static const char *ftpat = "%s/ftdetect/*.vim"; // NOLINT
size_t len = STRLEN(ffname) + STRLEN(ftpat);
diff --git a/src/nvim/hardcopy.c b/src/nvim/hardcopy.c
index 6acf7f395a..cb0415a486 100644
--- a/src/nvim/hardcopy.c
+++ b/src/nvim/hardcopy.c
@@ -269,17 +269,25 @@ char_u *parse_printmbfont(void)
* Returns an error message for an illegal option, NULL otherwise.
* Only used for the printer at the moment...
*/
-static char_u *parse_list_options(char_u *option_str, option_table_T *table, int table_size)
+static char_u *parse_list_options(char_u *option_str, option_table_T *table,
+ size_t table_size)
{
+ option_table_T *old_opts;
+ char_u *ret = NULL;
char_u *stringp;
char_u *colonp;
char_u *commap;
char_u *p;
- int idx = 0; /* init for GCC */
+ size_t idx = 0; // init for GCC
int len;
- for (idx = 0; idx < table_size; ++idx)
- table[idx].present = FALSE;
+ // Save the old values, so that they can be restored in case of an error.
+ old_opts = (option_table_T *)xmalloc(sizeof(option_table_T) * table_size);
+
+ for (idx = 0; idx < table_size; idx++) {
+ old_opts[idx] = table[idx];
+ table[idx].present = false;
+ }
/*
* Repeat for all comma separated parts.
@@ -287,8 +295,10 @@ static char_u *parse_list_options(char_u *option_str, option_table_T *table, int
stringp = option_str;
while (*stringp) {
colonp = vim_strchr(stringp, ':');
- if (colonp == NULL)
- return (char_u *)N_("E550: Missing colon");
+ if (colonp == NULL) {
+ ret = (char_u *)N_("E550: Missing colon");
+ break;
+ }
commap = vim_strchr(stringp, ',');
if (commap == NULL)
commap = option_str + STRLEN(option_str);
@@ -299,15 +309,19 @@ static char_u *parse_list_options(char_u *option_str, option_table_T *table, int
if (STRNICMP(stringp, table[idx].name, len) == 0)
break;
- if (idx == table_size)
- return (char_u *)N_("E551: Illegal component");
+ if (idx == table_size) {
+ ret = (char_u *)N_("E551: Illegal component");
+ break;
+ }
p = colonp + 1;
table[idx].present = TRUE;
if (table[idx].hasnum) {
- if (!ascii_isdigit(*p))
- return (char_u *)N_("E552: digit expected");
+ if (!ascii_isdigit(*p)) {
+ ret = (char_u *)N_("E552: digit expected");
+ break;
+ }
table[idx].number = getdigits_int(&p);
}
@@ -320,7 +334,15 @@ static char_u *parse_list_options(char_u *option_str, option_table_T *table, int
++stringp;
}
- return NULL;
+ if (ret != NULL) {
+ // Restore old options in case of error
+ for (idx = 0; idx < table_size; idx++) {
+ table[idx] = old_opts[idx];
+ }
+ }
+
+ xfree(old_opts);
+ return ret;
}
diff --git a/src/nvim/hashtab.c b/src/nvim/hashtab.c
index 7d4ae61fc4..fa4077f22f 100644
--- a/src/nvim/hashtab.c
+++ b/src/nvim/hashtab.c
@@ -368,8 +368,7 @@ hash_T hash_hash(char_u *key)
hash_T hash = *key;
if (hash == 0) {
- // Empty keys are not allowed, but we don't want to crash if we get one.
- return (hash_T) 0;
+ return (hash_T)0;
}
// A simplistic algorithm that appears to do very well.
diff --git a/src/nvim/main.c b/src/nvim/main.c
index 1bd622bdba..9b9976ac0a 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -557,6 +557,8 @@ void getout(int exitval)
if (exmode_active)
exitval += ex_exitval;
+ set_vim_var_nr(VV_EXITING, exitval);
+
/* Position the cursor on the last screen line, below all the text */
ui_cursor_goto((int)Rows - 1, 0);
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 5bf743c4df..9075f94a20 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -4939,8 +4939,8 @@ void win_redr_status(win_T *wp)
*/
static void redraw_custom_statusline(win_T *wp)
{
- static int entered = FALSE;
- int save_called_emsg = called_emsg;
+ static int entered = false;
+ int saved_did_emsg = did_emsg;
/* When called recursively return. This can happen when the statusline
* contains an expression that triggers a redraw. */
@@ -4948,18 +4948,18 @@ static void redraw_custom_statusline(win_T *wp)
return;
entered = TRUE;
- called_emsg = FALSE;
- win_redr_custom(wp, FALSE);
- if (called_emsg) {
- /* When there is an error disable the statusline, otherwise the
- * display is messed up with errors and a redraw triggers the problem
- * again and again. */
+ did_emsg = false;
+ win_redr_custom(wp, false);
+ if (did_emsg) {
+ // When there is an error disable the statusline, otherwise the
+ // display is messed up with errors and a redraw triggers the problem
+ // again and again.
set_string_option_direct((char_u *)"statusline", -1,
(char_u *)"", OPT_FREE | (*wp->w_p_stl != NUL
? OPT_LOCAL : OPT_GLOBAL), SID_ERROR);
}
- called_emsg |= save_called_emsg;
- entered = FALSE;
+ did_emsg |= saved_did_emsg;
+ entered = false;
}
/*
@@ -6888,16 +6888,17 @@ static void draw_tabline(void)
/* Use the 'tabline' option if it's set. */
if (*p_tal != NUL) {
- int save_called_emsg = called_emsg;
+ int saved_did_emsg = did_emsg;
- /* Check for an error. If there is one we would loop in redrawing the
- * screen. Avoid that by making 'tabline' empty. */
- called_emsg = FALSE;
- win_redr_custom(NULL, FALSE);
- if (called_emsg)
+ // Check for an error. If there is one we would loop in redrawing the
+ // screen. Avoid that by making 'tabline' empty.
+ did_emsg = false;
+ win_redr_custom(NULL, false);
+ if (did_emsg) {
set_string_option_direct((char_u *)"tabline", -1,
- (char_u *)"", OPT_FREE, SID_ERROR);
- called_emsg |= save_called_emsg;
+ (char_u *)"", OPT_FREE, SID_ERROR);
+ }
+ did_emsg |= saved_did_emsg;
} else {
FOR_ALL_TABS(tp) {
++tabcount;
diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim
index 34b6b846ca..d1857565a4 100644
--- a/src/nvim/testdir/runtest.vim
+++ b/src/nvim/testdir/runtest.vim
@@ -59,6 +59,9 @@ lang mess C
" Always use forward slashes.
set shellslash
+" Make sure $HOME does not get read or written.
+let $HOME = '/does/not/exist'
+
function RunTheTest(test)
echo 'Executing ' . a:test
if exists("*SetUp")
@@ -131,6 +134,9 @@ for s:test in sort(s:tests)
endfor
+" Don't write viminfo on exit.
+set viminfo=
+
if s:fail == 0
" Success, create the .res file so that make knows it's done.
exe 'split ' . fnamemodify(g:testname, ':r') . '.res'
diff --git a/src/nvim/testdir/test_alot.vim b/src/nvim/testdir/test_alot.vim
index 5a71b4fdd1..083f57aec1 100644
--- a/src/nvim/testdir/test_alot.vim
+++ b/src/nvim/testdir/test_alot.vim
@@ -13,7 +13,9 @@ source test_messages.vim
source test_options.vim
source test_popup.vim
source test_regexp_utf8.vim
+source test_statusline.vim
source test_syn_attr.vim
+source test_tabline.vim
source test_tabpage.vim
source test_unlet.vim
source test_matchadd_conceal_utf8.vim
diff --git a/src/nvim/testdir/test_expr.vim b/src/nvim/testdir/test_expr.vim
index 83b5e66fe0..66a10b05e1 100644
--- a/src/nvim/testdir/test_expr.vim
+++ b/src/nvim/testdir/test_expr.vim
@@ -38,3 +38,17 @@ func Test_strcharpart()
call assert_equal('a', strcharpart('axb', -1, 2))
endfunc
+
+func Test_dict()
+ let d = {'': 'empty', 'a': 'a', 0: 'zero'}
+ call assert_equal('empty', d[''])
+ call assert_equal('a', d['a'])
+ call assert_equal('zero', d[0])
+ call assert_true(has_key(d, ''))
+ call assert_true(has_key(d, 'a'))
+
+ let d[''] = 'none'
+ let d['a'] = 'aaa'
+ call assert_equal('none', d[''])
+ call assert_equal('aaa', d['a'])
+endfunc
diff --git a/src/nvim/testdir/test_hardcopy.vim b/src/nvim/testdir/test_hardcopy.vim
index 4629d17dd2..ea9790d134 100644
--- a/src/nvim/testdir/test_hardcopy.vim
+++ b/src/nvim/testdir/test_hardcopy.vim
@@ -23,6 +23,10 @@ func Test_printoptions_parsing()
set printoptions=formfeed:y
set printoptions=
set printoptions&
+
+ call assert_fails('set printoptions=paper', 'E550:')
+ call assert_fails('set printoptions=shredder:on', 'E551:')
+ call assert_fails('set printoptions=left:no', 'E552:')
endfunc
func Test_printmbfont_parsing()
diff --git a/src/nvim/testdir/test_statusline.vim b/src/nvim/testdir/test_statusline.vim
new file mode 100644
index 0000000000..82898df92d
--- /dev/null
+++ b/src/nvim/testdir/test_statusline.vim
@@ -0,0 +1,39 @@
+function! StatuslineWithCaughtError()
+ let s:func_in_statusline_called = 1
+ try
+ call eval('unknown expression')
+ catch
+ endtry
+ return ''
+endfunction
+
+function! StatuslineWithError()
+ let s:func_in_statusline_called = 1
+ call eval('unknown expression')
+ return ''
+endfunction
+
+function! Test_caught_error_in_statusline()
+ let s:func_in_statusline_called = 0
+ set laststatus=2
+ let statusline = '%{StatuslineWithCaughtError()}'
+ let &statusline = statusline
+ redrawstatus
+ call assert_true(s:func_in_statusline_called)
+ call assert_equal(statusline, &statusline)
+ set statusline=
+endfunction
+
+function! Test_statusline_will_be_disabled_with_error()
+ let s:func_in_statusline_called = 0
+ set laststatus=2
+ let statusline = '%{StatuslineWithError()}'
+ try
+ let &statusline = statusline
+ redrawstatus
+ catch
+ endtry
+ call assert_true(s:func_in_statusline_called)
+ call assert_equal('', &statusline)
+ set statusline=
+endfunction
diff --git a/src/nvim/testdir/test_tabline.vim b/src/nvim/testdir/test_tabline.vim
new file mode 100644
index 0000000000..6c7a02d650
--- /dev/null
+++ b/src/nvim/testdir/test_tabline.vim
@@ -0,0 +1,43 @@
+function! TablineWithCaughtError()
+ let s:func_in_tabline_called = 1
+ try
+ call eval('unknown expression')
+ catch
+ endtry
+ return ''
+endfunction
+
+function! TablineWithError()
+ let s:func_in_tabline_called = 1
+ call eval('unknown expression')
+ return ''
+endfunction
+
+function! Test_caught_error_in_tabline()
+ let showtabline_save = &showtabline
+ set showtabline=2
+ let s:func_in_tabline_called = 0
+ let tabline = '%{TablineWithCaughtError()}'
+ let &tabline = tabline
+ redraw!
+ call assert_true(s:func_in_tabline_called)
+ call assert_equal(tabline, &tabline)
+ set tabline=
+ let &showtabline = showtabline_save
+endfunction
+
+function! Test_tabline_will_be_disabled_with_error()
+ let showtabline_save = &showtabline
+ set showtabline=2
+ let s:func_in_tabline_called = 0
+ let tabline = '%{TablineWithError()}'
+ try
+ let &tabline = tabline
+ redraw!
+ catch
+ endtry
+ call assert_true(s:func_in_tabline_called)
+ call assert_equal('', &tabline)
+ set tabline=
+ let &showtabline = showtabline_save
+endfunction
diff --git a/src/nvim/testdir/test_viml.vim b/src/nvim/testdir/test_viml.vim
index c39c5e6b28..a11d62f5cf 100644
--- a/src/nvim/testdir/test_viml.vim
+++ b/src/nvim/testdir/test_viml.vim
@@ -949,6 +949,14 @@ func Test_type()
call assert_equal(6, type(v:false))
call assert_equal(6, type(v:true))
call assert_equal(7, type(v:null))
+ call assert_equal(v:t_number, type(0))
+ call assert_equal(v:t_string, type(""))
+ call assert_equal(v:t_func, type(function("tr")))
+ call assert_equal(v:t_list, type([]))
+ call assert_equal(v:t_dict, type({}))
+ call assert_equal(v:t_float, type(0.0))
+ call assert_equal(v:t_bool, type(v:false))
+ call assert_equal(v:t_bool, type(v:true))
endfunc
"-------------------------------------------------------------------------------
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c
index 5e30517c5a..2171e580ba 100644
--- a/src/nvim/tui/tui.c
+++ b/src/nvim/tui/tui.c
@@ -461,6 +461,10 @@ static void tui_mode_change(UI *ui, int mode)
if (data->showing_mode != INSERT) {
unibi_out(ui, data->unibi_ext.set_cursor_shape_bar);
}
+ } else if (mode == CMDLINE) {
+ if (data->showing_mode != CMDLINE) {
+ unibi_out(ui, data->unibi_ext.set_cursor_shape_bar);
+ }
} else if (mode == REPLACE) {
if (data->showing_mode != REPLACE) {
unibi_out(ui, data->unibi_ext.set_cursor_shape_ul);
diff --git a/src/nvim/ui.c b/src/nvim/ui.c
index 549ed8aa7d..ea0bccb1cd 100644
--- a/src/nvim/ui.c
+++ b/src/nvim/ui.c
@@ -532,13 +532,16 @@ static void ui_mode_change(void)
if (!full_screen) {
return;
}
- /* Get a simple UI mode out of State. */
- if ((State & REPLACE) == REPLACE)
+ // Get a simple UI mode out of State.
+ if ((State & REPLACE) == REPLACE) {
mode = REPLACE;
- else if (State & INSERT)
+ } else if (State & INSERT) {
mode = INSERT;
- else
+ } else if (State & CMDLINE) {
+ mode = CMDLINE;
+ } else {
mode = NORMAL;
+ }
UI_CALL(mode_change, mode);
conceal_check_cursur_line();
}
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 0097f78e89..05855ee385 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -131,7 +131,7 @@ static int included_patches[] = {
// 2314,
// 2313,
2312,
- // 2311,
+ // 2311 NA
// 2310 NA
2309,
// 2308 NA
@@ -371,7 +371,7 @@ static int included_patches[] = {
// 2074,
// 2073,
// 2072,
- // 2071,
+ 2071,
// 2070 NA
// 2069,
// 2068,
@@ -435,7 +435,7 @@ static int included_patches[] = {
// 2010,
// 2009,
// 2008,
- // 2007,
+ 2007,
// 2006,
// 2005,
// 2004 NA
@@ -721,7 +721,7 @@ static int included_patches[] = {
// 1726 NA
// 1725 NA
// 1724 NA
- // 1723,
+ 1723,
// 1722 NA
// 1721 NA
// 1720,
@@ -733,19 +733,19 @@ static int included_patches[] = {
1714,
// 1713 NA
1712,
- // 1711,
- // 1710,
+ 1711,
+ // 1710 NA
// 1709 NA
// 1708,
- // 1707,
+ 1707,
// 1706 NA
// 1705 NA
1704,
1703,
- // 1702,
- // 1701,
+ 1702,
+ 1701,
1700,
- // 1699,
+ 1699,
// 1698 NA
1697,
1696,
@@ -758,7 +758,7 @@ static int included_patches[] = {
// 1689 NA
// 1688 NA
// 1687 NA
- // 1686,
+ 1686,
// 1685,
// 1684 NA
// 1683 NA
diff --git a/src/nvim/vim.h b/src/nvim/vim.h
index 32eba55c18..8271abda8d 100644
--- a/src/nvim/vim.h
+++ b/src/nvim/vim.h
@@ -123,6 +123,14 @@ Error: configure did not run properly.Check auto/config.log.
#define FAIL 0
#define NOTDONE 2 /* not OK or FAIL but skipped */
+// Type values for type().
+#define VAR_TYPE_NUMBER 0
+#define VAR_TYPE_STRING 1
+#define VAR_TYPE_FUNC 2
+#define VAR_TYPE_LIST 3
+#define VAR_TYPE_DICT 4
+#define VAR_TYPE_FLOAT 5
+#define VAR_TYPE_BOOL 6
/*
* values for xp_context when doing command line completion