mirror of
https://github.com/neovim/neovim.git
synced 2025-01-01 17:23:36 -07:00
Merge #11977 from janlazo/vim-8.1.1279
vim-patch:8.1.1279,8.2.{360,361}
This commit is contained in:
commit
2b00d1d09c
@ -36,8 +36,7 @@ $scoop = (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh'
|
|||||||
Invoke-Expression $scoop
|
Invoke-Expression $scoop
|
||||||
}
|
}
|
||||||
|
|
||||||
scoop install diffutils perl
|
scoop install perl
|
||||||
diff3 --version
|
|
||||||
perl --version
|
perl --version
|
||||||
cpanm.bat --version
|
cpanm.bat --version
|
||||||
|
|
||||||
@ -81,7 +80,7 @@ if ($compiler -eq 'MINGW') {
|
|||||||
# in MSYS2, but we cannot build inside the MSYS2 shell.
|
# in MSYS2, but we cannot build inside the MSYS2 shell.
|
||||||
$cmakeGenerator = 'Ninja'
|
$cmakeGenerator = 'Ninja'
|
||||||
$cmakeGeneratorArgs = '-v'
|
$cmakeGeneratorArgs = '-v'
|
||||||
$mingwPackages = @('ninja', 'cmake').ForEach({
|
$mingwPackages = @('ninja', 'cmake', 'diffutils').ForEach({
|
||||||
"mingw-w64-$arch-$_"
|
"mingw-w64-$arch-$_"
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -376,6 +376,10 @@ else
|
|||||||
elseif s:line1 =~? '-\*-.*erlang.*-\*-'
|
elseif s:line1 =~? '-\*-.*erlang.*-\*-'
|
||||||
set ft=erlang
|
set ft=erlang
|
||||||
|
|
||||||
|
" YAML
|
||||||
|
elseif s:line1 =~# '^%YAML'
|
||||||
|
set ft=yaml
|
||||||
|
|
||||||
" CVS diff
|
" CVS diff
|
||||||
else
|
else
|
||||||
let s:lnum = 1
|
let s:lnum = 1
|
||||||
|
@ -8114,10 +8114,16 @@ void get_system_output_as_rettv(typval_T *argvars, typval_T *rettv,
|
|||||||
bool callback_from_typval(Callback *const callback, typval_T *const arg)
|
bool callback_from_typval(Callback *const callback, typval_T *const arg)
|
||||||
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT
|
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT
|
||||||
{
|
{
|
||||||
|
int r = OK;
|
||||||
|
|
||||||
if (arg->v_type == VAR_PARTIAL && arg->vval.v_partial != NULL) {
|
if (arg->v_type == VAR_PARTIAL && arg->vval.v_partial != NULL) {
|
||||||
callback->data.partial = arg->vval.v_partial;
|
callback->data.partial = arg->vval.v_partial;
|
||||||
callback->data.partial->pt_refcount++;
|
callback->data.partial->pt_refcount++;
|
||||||
callback->type = kCallbackPartial;
|
callback->type = kCallbackPartial;
|
||||||
|
} else if (arg->v_type == VAR_STRING
|
||||||
|
&& arg->vval.v_string != NULL
|
||||||
|
&& ascii_isdigit(*arg->vval.v_string)) {
|
||||||
|
r = FAIL;
|
||||||
} else if (arg->v_type == VAR_FUNC || arg->v_type == VAR_STRING) {
|
} else if (arg->v_type == VAR_FUNC || arg->v_type == VAR_STRING) {
|
||||||
char_u *name = arg->vval.v_string;
|
char_u *name = arg->vval.v_string;
|
||||||
func_ref(name);
|
func_ref(name);
|
||||||
@ -8126,6 +8132,10 @@ bool callback_from_typval(Callback *const callback, typval_T *const arg)
|
|||||||
} else if (arg->v_type == VAR_NUMBER && arg->vval.v_number == 0) {
|
} else if (arg->v_type == VAR_NUMBER && arg->vval.v_number == 0) {
|
||||||
callback->type = kCallbackNone;
|
callback->type = kCallbackNone;
|
||||||
} else {
|
} else {
|
||||||
|
r = FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (r == FAIL) {
|
||||||
EMSG(_("E921: Invalid callback argument"));
|
EMSG(_("E921: Invalid callback argument"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2568,7 +2568,7 @@ static bool valid_filetype(const char_u *val)
|
|||||||
bool valid_spellang(const char_u *val)
|
bool valid_spellang(const char_u *val)
|
||||||
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
|
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
|
||||||
{
|
{
|
||||||
return valid_name(val, ".-_,");
|
return valid_name(val, ".-_,@");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return true if "val" is a valid 'spellfile' value.
|
/// Return true if "val" is a valid 'spellfile' value.
|
||||||
|
@ -600,6 +600,7 @@ let s:script_checks = {
|
|||||||
\ 'haskell': [['#!/path/haskell']],
|
\ 'haskell': [['#!/path/haskell']],
|
||||||
\ 'cpp': [['// Standard iostream objects -*- C++ -*-'],
|
\ 'cpp': [['// Standard iostream objects -*- C++ -*-'],
|
||||||
\ ['// -*- C++ -*-']],
|
\ ['// -*- C++ -*-']],
|
||||||
|
\ 'yaml': [['%YAML 1.2']],
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
func Test_script_detection()
|
func Test_script_detection()
|
||||||
|
@ -339,4 +339,8 @@ func Test_nocatch_garbage_collect()
|
|||||||
delfunc FeedChar
|
delfunc FeedChar
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_timer_invalid_callback()
|
||||||
|
call assert_fails('call timer_start(0, "0")', 'E921')
|
||||||
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
Loading…
Reference in New Issue
Block a user