diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-09-13 21:22:27 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-09-13 21:22:27 +0000 |
commit | e6facf94903e75669de8cb180c3dfaec6ea5d59a (patch) | |
tree | 08e7f735f14fcc4275c50eca0f9d04db4e507c91 /src | |
parent | f75a963eea9a893bb60c0b8eb425b2161de4919f (diff) | |
download | vim-e6facf94903e75669de8cb180c3dfaec6ea5d59a.zip |
updated for version 7.0146
Diffstat (limited to 'src')
-rw-r--r-- | src/eval.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c index 600a0207e..e087b7aab 100644 --- a/src/eval.c +++ b/src/eval.c @@ -6849,7 +6849,7 @@ static struct fst {"resolve", 1, 1, f_resolve}, {"reverse", 1, 1, f_reverse}, {"search", 1, 2, f_search}, - {"searchdecl", 1, 2, f_searchdecl}, + {"searchdecl", 1, 3, f_searchdecl}, {"searchpair", 3, 5, f_searchpair}, {"server2client", 2, 2, f_server2client}, {"serverlist", 0, 0, f_serverlist}, @@ -13048,6 +13048,7 @@ f_searchdecl(argvars, rettv) typval_T *rettv; { int locally = 1; + int thisblock = 0; int error = FALSE; char_u *name; @@ -13055,10 +13056,14 @@ f_searchdecl(argvars, rettv) name = get_tv_string_chk(&argvars[0]); if (argvars[1].v_type != VAR_UNKNOWN) + { locally = get_tv_number_chk(&argvars[1], &error) == 0; + if (!error && argvars[2].v_type != VAR_UNKNOWN) + thisblock = get_tv_number_chk(&argvars[2], &error) != 0; + } if (!error && name != NULL) rettv->vval.v_number = find_decl(name, (int)STRLEN(name), - locally, SEARCH_KEEP) == FAIL; + locally, thisblock, SEARCH_KEEP) == FAIL; } /* |