Skip to content

Commit 69744f5

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 170f2f4 + 3834e3d commit 69744f5

39 files changed

+683
-231
lines changed

Filelist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ SRC_ALL = \
105105
src/testdir/sautest/autoload/*.vim \
106106
src/testdir/runtest.vim \
107107
src/testdir/shared.vim \
108+
src/testdir/view_util.vim \
108109
src/testdir/setup.vim \
110+
src/testdir/gui_init.vim \
111+
src/testdir/setup_gui.vim \
109112
src/testdir/test[0-9]*.ok \
110113
src/testdir/test[0-9]*a.ok \
111114
src/testdir/test_[a-z]*.ok \

runtime/doc/if_mzsch.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ Windows *mzscheme-window*
249249
5. mzeval() Vim function *mzscheme-mzeval*
250250

251251
To facilitate bi-directional interface, you can use |mzeval()| function to
252-
evaluate MzScheme expressions and pass their values to VimL.
252+
evaluate MzScheme expressions and pass their values to Vim script.
253253

254254
==============================================================================
255255
6. Using Function references *mzscheme-funcref*

runtime/doc/if_pyth.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -676,11 +676,11 @@ vim.Function object *python-Function*
676676
dictionary. Note that explicit `self` keyword used when
677677
calling resulting object overrides this attribute.
678678
auto_rebind Boolean. True if partial created from this Python object
679-
and stored in the VimL dictionary should be automatically
680-
rebound to the dictionary it is stored in when this
681-
dictionary is indexed. Exposes Vim internal difference
682-
between `dict.func` (auto_rebind=True) and
683-
`function(dict.func,dict)` (auto_rebind=False). This
679+
and stored in the Vim script dictionary should be
680+
automatically rebound to the dictionary it is stored in
681+
when this dictionary is indexed. Exposes Vim internal
682+
difference between `dict.func` (auto_rebind=True) and
683+
`function(dict.func,dict)` (auto_rebind=False). This
684684
attribute makes no sense if `self` attribute is `None`.
685685

686686
Constructor additionally accepts `args`, `self` and `auto_rebind`
@@ -711,7 +711,7 @@ vim.Function object *python-Function*
711711
8. pyeval() and py3eval() Vim functions *python-pyeval*
712712

713713
To facilitate bi-directional interface, you can use |pyeval()| and |py3eval()|
714-
functions to evaluate Python expressions and pass their values to VimL.
714+
functions to evaluate Python expressions and pass their values to Vim script.
715715
|pyxeval()| is also available.
716716

717717
==============================================================================

runtime/doc/syntax.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3327,8 +3327,8 @@ Some folding is now supported with syntax/vim.vim: >
33273327
g:vimsyn_folding =~ 't' : fold tcl script
33283328
<
33293329
*g:vimsyn_noerror*
3330-
Not all error highlighting that syntax/vim.vim does may be correct; VimL is a
3331-
difficult language to highlight correctly. A way to suppress error
3330+
Not all error highlighting that syntax/vim.vim does may be correct; Vim script
3331+
is a difficult language to highlight correctly. A way to suppress error
33323332
highlighting is to put the following line in your |vimrc|: >
33333333
33343334
let g:vimsyn_noerror = 1

runtime/doc/usr_02.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ Summary: *help-summary* >
589589
register: >
590590
:help quote:
591591
592-
13) Vim Script (VimL) is available at >
592+
13) Vim script is available at >
593593
:help eval.txt
594594
< Certain aspects of the language are available at :h expr-X where "X" is a
595595
single letter. E.g. >
@@ -599,10 +599,10 @@ Summary: *help-summary* >
599599
Also important is >
600600
:help function-list
601601
< to find a short description of all functions available. Help topics for
602-
VimL functions always include the "()", so: >
602+
Vim script functions always include the "()", so: >
603603
:help append()
604-
< talks about the append VimL function rather than how to append text in the
605-
current buffer.
604+
< talks about the append Vim script function rather than how to append text
605+
in the current buffer.
606606

607607
14) Mappings are talked about in the help page :h |map.txt|. Use >
608608
:help mapmode-i

runtime/doc/version7.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10204,7 +10204,7 @@ objects in place of `str()` ones avoiding possibility of UnicodeDecodeError.
1020410204
interfaces to some extent. Extent will be improved in the future.
1020510205

1020610206
Added special |python-vars| objects also available for |python-buffer| and
10207-
|python-window|. They ease access to VimL variables from Python.
10207+
|python-window|. They ease access to Vim script variables from Python.
1020810208

1020910209
Now you no longer need to alter `sys.path` to import your module: special
1021010210
hooks are responsible for importing from {rtp}/python2, {rtp}/python3 and

src/Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2099,7 +2099,7 @@ test1 \
20992099
test50 test51 test52 test53 test54 test55 test56 test57 test58 test59 \
21002100
test60 test64 test65 test66 test67 test68 test69 \
21012101
test70 test72 test73 test74 test75 test77 test78 test79 \
2102-
test80 test82 test83 test84 test85 test86 test87 test88 test89 \
2102+
test80 test82 test83 test84 test85 test86 test87 test88 \
21032103
test90 test91 test94 test95 test97 test98 test99 \
21042104
test100 test101 test103 test104 test107 test108:
21052105
cd testdir; rm -f [email protected]; $(MAKE) -f Makefile [email protected] VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
@@ -2139,6 +2139,7 @@ test_arglist \
21392139
test_fileformat \
21402140
test_filter_cmd \
21412141
test_filter_map \
2142+
test_findfile \
21422143
test_float_func \
21432144
test_fnameescape \
21442145
test_fnamemodify \
@@ -2149,6 +2150,7 @@ test_arglist \
21492150
test_gn \
21502151
test_goto \
21512152
test_gui \
2153+
test_gui_init \
21522154
test_hardcopy \
21532155
test_help \
21542156
test_help_tagjump \
@@ -2181,6 +2183,7 @@ test_arglist \
21812183
test_nested_function \
21822184
test_netbeans \
21832185
test_normal \
2186+
test_number \
21842187
test_options \
21852188
test_packadd \
21862189
test_partial \
@@ -2228,7 +2231,7 @@ test_arglist \
22282231
test_usercommands \
22292232
test_utf8 \
22302233
test_viminfo \
2231-
test_viml \
2234+
test_vimscript \
22322235
test_visual \
22332236
test_window_cmd \
22342237
test_window_id \

src/edit.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8195,7 +8195,8 @@ in_cinkeys(
81958195
{
81968196
if (try_match && *look == keytyped)
81978197
return TRUE;
8198-
++look;
8198+
if (*look != NUL)
8199+
++look;
81998200
}
82008201

82018202
/*

src/eval.c

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ eval_expr(char_u *arg, char_u **nextcmd)
950950

951951

952952
/*
953-
* Call some vimL function and return the result in "*rettv".
953+
* Call some Vim script function and return the result in "*rettv".
954954
* Uses argv[argc] for the function arguments. Only Number and String
955955
* arguments are currently supported.
956956
* Returns OK or FAIL.
@@ -1027,7 +1027,7 @@ call_vim_function(
10271027
}
10281028

10291029
/*
1030-
* Call vimL function "func" and return the result as a number.
1030+
* Call Vim script function "func" and return the result as a number.
10311031
* Returns -1 when calling the function fails.
10321032
* Uses argv[argc] for the function arguments.
10331033
*/
@@ -1055,7 +1055,7 @@ call_func_retnr(
10551055

10561056
# if (defined(FEAT_USR_CMDS) && defined(FEAT_CMDL_COMPL)) || defined(PROTO)
10571057
/*
1058-
* Call vimL function "func" and return the result as a string.
1058+
* Call Vim script function "func" and return the result as a string.
10591059
* Returns NULL when calling the function fails.
10601060
* Uses argv[argc] for the function arguments.
10611061
*/
@@ -1080,7 +1080,7 @@ call_func_retstr(
10801080
# endif
10811081

10821082
/*
1083-
* Call vimL function "func" and return the result as a List.
1083+
* Call Vim script function "func" and return the result as a List.
10841084
* Uses argv[argc] for the function arguments.
10851085
* Returns NULL when there is something wrong.
10861086
*/
@@ -1898,6 +1898,8 @@ get_lval(
18981898
* Loop until no more [idx] or .key is following.
18991899
*/
19001900
lp->ll_tv = &v->di_tv;
1901+
var1.v_type = VAR_UNKNOWN;
1902+
var2.v_type = VAR_UNKNOWN;
19011903
while (*p == '[' || (*p == '.' && lp->ll_tv->v_type == VAR_DICT))
19021904
{
19031905
if (!(lp->ll_tv->v_type == VAR_LIST && lp->ll_tv->vval.v_list != NULL)
@@ -1955,17 +1957,15 @@ get_lval(
19551957
{
19561958
if (!quiet)
19571959
EMSG(_(e_dictrange));
1958-
if (!empty1)
1959-
clear_tv(&var1);
1960+
clear_tv(&var1);
19601961
return NULL;
19611962
}
19621963
if (rettv != NULL && (rettv->v_type != VAR_LIST
19631964
|| rettv->vval.v_list == NULL))
19641965
{
19651966
if (!quiet)
19661967
EMSG(_("E709: [:] requires a List value"));
1967-
if (!empty1)
1968-
clear_tv(&var1);
1968+
clear_tv(&var1);
19691969
return NULL;
19701970
}
19711971
p = skipwhite(p + 1);
@@ -1976,15 +1976,13 @@ get_lval(
19761976
lp->ll_empty2 = FALSE;
19771977
if (eval1(&p, &var2, TRUE) == FAIL) /* recursive! */
19781978
{
1979-
if (!empty1)
1980-
clear_tv(&var1);
1979+
clear_tv(&var1);
19811980
return NULL;
19821981
}
19831982
if (get_tv_string_chk(&var2) == NULL)
19841983
{
19851984
/* not a number or string */
1986-
if (!empty1)
1987-
clear_tv(&var1);
1985+
clear_tv(&var1);
19881986
clear_tv(&var2);
19891987
return NULL;
19901988
}
@@ -1998,10 +1996,8 @@ get_lval(
19981996
{
19991997
if (!quiet)
20001998
EMSG(_(e_missbrac));
2001-
if (!empty1)
2002-
clear_tv(&var1);
2003-
if (lp->ll_range && !lp->ll_empty2)
2004-
clear_tv(&var2);
1999+
clear_tv(&var1);
2000+
clear_tv(&var2);
20052001
return NULL;
20062002
}
20072003

@@ -2064,16 +2060,14 @@ get_lval(
20642060
{
20652061
if (!quiet)
20662062
EMSG2(_(e_dictkey), key);
2067-
if (len == -1)
2068-
clear_tv(&var1);
2063+
clear_tv(&var1);
20692064
return NULL;
20702065
}
20712066
if (len == -1)
20722067
lp->ll_newkey = vim_strsave(key);
20732068
else
20742069
lp->ll_newkey = vim_strnsave(key, len);
2075-
if (len == -1)
2076-
clear_tv(&var1);
2070+
clear_tv(&var1);
20772071
if (lp->ll_newkey == NULL)
20782072
p = NULL;
20792073
break;
@@ -2086,8 +2080,7 @@ get_lval(
20862080
return NULL;
20872081
}
20882082

2089-
if (len == -1)
2090-
clear_tv(&var1);
2083+
clear_tv(&var1);
20912084
lp->ll_tv = &lp->ll_di->di_tv;
20922085
}
20932086
else
@@ -2098,11 +2091,10 @@ get_lval(
20982091
if (empty1)
20992092
lp->ll_n1 = 0;
21002093
else
2101-
{
2094+
/* is number or string */
21022095
lp->ll_n1 = (long)get_tv_number(&var1);
2103-
/* is number or string */
2104-
clear_tv(&var1);
2105-
}
2096+
clear_tv(&var1);
2097+
21062098
lp->ll_dict = NULL;
21072099
lp->ll_list = lp->ll_tv->vval.v_list;
21082100
lp->ll_li = list_find(lp->ll_list, lp->ll_n1);
@@ -2116,8 +2108,7 @@ get_lval(
21162108
}
21172109
if (lp->ll_li == NULL)
21182110
{
2119-
if (lp->ll_range && !lp->ll_empty2)
2120-
clear_tv(&var2);
2111+
clear_tv(&var2);
21212112
if (!quiet)
21222113
EMSGN(_(e_listidx), lp->ll_n1);
21232114
return NULL;
@@ -2161,6 +2152,7 @@ get_lval(
21612152
}
21622153
}
21632154

2155+
clear_tv(&var1);
21642156
return p;
21652157
}
21662158

src/ex_getln.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5154,8 +5154,8 @@ expand_shellcmd(
51545154
static void * call_user_expand_func(void *(*user_expand_func)(char_u *, int, char_u **, int), expand_T *xp, int *num_file, char_u ***file);
51555155

51565156
/*
5157-
* Call "user_expand_func()" to invoke a user defined VimL function and return
5158-
* the result (either a string or a List).
5157+
* Call "user_expand_func()" to invoke a user defined Vim script function and
5158+
* return the result (either a string or a List).
51595159
*/
51605160
static void *
51615161
call_user_expand_func(

0 commit comments

Comments
 (0)