Skip to content

Commit adb83be

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 38b772a + 8dcf259 commit adb83be

27 files changed

+472
-219
lines changed

runtime/doc/eval.txt

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 7.4. Last change: 2016 Mar 08
1+
*eval.txt* For Vim version 7.4. Last change: 2016 Mar 12
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -113,16 +113,8 @@ to Float, printf() for Float to String and float2nr() for Float to Number.
113113
*E891* *E892* *E893* *E894* *E907* *E911* *E914*
114114
When expecting a Float a Number can also be used, but nothing else.
115115

116-
*E706* *sticky-type-checking*
117-
You will get an error if you try to change the type of a variable. You need
118-
to |:unlet| it first to avoid this error. String and Number are considered
119-
equivalent though, as well are Float and Number. Consider this sequence of
120-
commands: >
121-
:let l = "string"
122-
:let l = 44 " changes type from String to Number
123-
:let l = [1, 2, 3] " error! l is still a Number
124-
:let l = 4.4 " changes type from Number to Float
125-
:let l = "string" " error!
116+
*no-type-checking*
117+
You will not get an error if you try to change the type of a variable.
126118

127119

128120
1.2 Function references ~
@@ -1969,6 +1961,7 @@ islocked( {expr}) Number TRUE if {expr} is locked
19691961
isnan( {expr}) Number TRUE if {expr} is NaN
19701962
items( {dict}) List key-value pairs in {dict}
19711963
job_getchannel( {job}) Channel get the channel handle for {job}
1964+
job_info( {job}) Dict get information about {job}
19721965
job_setoptions( {job}, {options}) none set options for {job}
19731966
job_start( {command} [, {options}]) Job start a job
19741967
job_status( {job}) String get the status of {job}
@@ -4473,10 +4466,18 @@ job_getchannel({job}) *job_getchannel()*
44734466
<
44744467
{only available when compiled with the |+job| feature}
44754468

4469+
job_info({job}) *job_info()*
4470+
Returns a Dictionary with information about {job}:
4471+
"status" what |job_status()| returns
4472+
"channel" what |job_getchannel()| returns
4473+
"exitval" only valid when "status" is "dead"
4474+
"exit-cb" function to be called on exit
4475+
"stoponexit" |job-stoponexit|
4476+
44764477
job_setoptions({job}, {options}) *job_setoptions()*
44774478
Change options for {job}. Supported are:
4478-
"stoponexit" |job-stoponexit|
4479-
"exit-cb" |job-exit-cb|
4479+
"stoponexit" |job-stoponexit|
4480+
"exit-cb" |job-exit-cb|
44804481

44814482
job_start({command} [, {options}]) *job_start()*
44824483
Start a job and return a Job object. Unlike |system()| and

runtime/doc/repeat.txt

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,12 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
182182
{not in Vi}
183183

184184
*:ru* *:runtime*
185-
:ru[ntime][!] {file} ..
185+
:ru[ntime][!] [where] {file} ..
186186
Read Ex commands from {file} in each directory given
187-
by 'runtimepath'. There is no error for non-existing
188-
files. Example: >
187+
by 'runtimepath' and/or 'packpath'. There is no error
188+
for non-existing files.
189+
190+
Example: >
189191
:runtime syntax/c.vim
190192
191193
< There can be multiple {file} arguments, separated by
@@ -199,6 +201,15 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
199201
When it is not included only the first found file is
200202
sourced.
201203

204+
When [where] is omitted only 'runtimepath' is used.
205+
Other values:
206+
START search under "start" in 'packpath'
207+
OPT search under "opt" in 'packpath'
208+
PACK search under "start" and "opt" in
209+
'packpath'
210+
ALL first use 'runtimepath', then search
211+
under "start" and "opt" in 'packpath'
212+
202213
When {file} contains wildcards it is expanded to all
203214
matching files. Example: >
204215
:runtime! plugin/*.vim
@@ -238,6 +249,16 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
238249

239250
Also see |pack-add|.
240251

252+
:packloadall[!] Load all packages in the "start" directories under
253+
'packpath'. The directories found are added to
254+
'runtimepath'.
255+
This normally done during startup, after loading your
256+
.vimrc file. With this command it can be done
257+
earlier.
258+
Packages will be loaded only once. After this command
259+
it won't happen again. When the optional ! is added
260+
this command will load packages even when done before.
261+
See |packages|.
241262

242263
:scripte[ncoding] [encoding] *:scripte* *:scriptencoding* *E167*
243264
Specify the character encoding used in the script.
@@ -461,8 +482,13 @@ Note that the files under "pack/foo/opt" or not loaded automatically, only the
461482
ones under "pack/foo/start". See |pack-add| below for how the "opt" directory
462483
is used.
463484

464-
Loading packages will not happen if loading plugins is disabled, see
465-
|load-plugins|.
485+
Loading packages automatically will not happen if loading plugins is disabled,
486+
see |load-plugins|.
487+
488+
To load packages earlier, so that 'runtimepath' gets updated: >
489+
:packloadall
490+
This also works when loading plugins is disabled. The automatic loading will
491+
only happen once.
466492

467493

468494
Using a single plugin and loading it automatically ~

src/digraph.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2320,13 +2320,13 @@ keymap_init(void)
23202320
/* try finding "keymap/'keymap'_'encoding'.vim" in 'runtimepath' */
23212321
vim_snprintf((char *)buf, buflen, "keymap/%s_%s.vim",
23222322
curbuf->b_p_keymap, p_enc);
2323-
if (source_runtime(buf, FALSE) == FAIL)
2323+
if (source_runtime(buf, 0) == FAIL)
23242324
# endif
23252325
{
23262326
/* try finding "keymap/'keymap'.vim" in 'runtimepath' */
23272327
vim_snprintf((char *)buf, buflen, "keymap/%s.vim",
23282328
curbuf->b_p_keymap);
2329-
if (source_runtime(buf, FALSE) == FAIL)
2329+
if (source_runtime(buf, 0) == FAIL)
23302330
{
23312331
vim_free(buf);
23322332
return (char_u *)N_("E544: Keymap file not found");

src/eval.c

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22118,22 +22118,6 @@ set_var(
2211822118
if (var_check_ro(v->di_flags, name, FALSE)
2211922119
|| tv_check_lock(v->di_tv.v_lock, name, FALSE))
2212022120
return;
22121-
if (v->di_tv.v_type != tv->v_type
22122-
&& !((v->di_tv.v_type == VAR_STRING
22123-
|| v->di_tv.v_type == VAR_NUMBER)
22124-
&& (tv->v_type == VAR_STRING
22125-
|| tv->v_type == VAR_NUMBER))
22126-
#ifdef FEAT_FLOAT
22127-
&& !((v->di_tv.v_type == VAR_NUMBER
22128-
|| v->di_tv.v_type == VAR_FLOAT)
22129-
&& (tv->v_type == VAR_NUMBER
22130-
|| tv->v_type == VAR_FLOAT))
22131-
#endif
22132-
)
22133-
{
22134-
EMSG2(_("E706: Variable type mismatch for: %s"), name);
22135-
return;
22136-
}
2213722121

2213822122
/*
2213922123
* Handle setting internal v: variables separately where needed to
@@ -23985,7 +23969,7 @@ script_autoload(
2398523969
}
2398623970

2398723971
/* Try loading the package from $VIMRUNTIME/autoload/<name>.vim */
23988-
if (source_runtime(scriptname, FALSE) == OK)
23972+
if (source_runtime(scriptname, 0) == OK)
2398923973
ret = TRUE;
2399023974
}
2399123975

0 commit comments

Comments
 (0)