From 45b8dc0c3df861e5fa9ba67f8ac5e0993d2dba5d Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 7 Mar 2020 22:37:00 -0500 Subject: [PATCH 1/5] Revert "ci/Appveyor: install diffutils via scoop" This reverts commit 4faf30de3ea72bd188c8894eb10f0c971ff28e90. --- ci/build.ps1 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ci/build.ps1 b/ci/build.ps1 index 01cf20874e..36570be7ae 100644 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -36,8 +36,7 @@ $scoop = (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh' Invoke-Expression $scoop } -scoop install diffutils perl -diff3 --version +scoop install perl perl --version cpanm.bat --version @@ -81,7 +80,7 @@ if ($compiler -eq 'MINGW') { # in MSYS2, but we cannot build inside the MSYS2 shell. $cmakeGenerator = 'Ninja' $cmakeGeneratorArgs = '-v' - $mingwPackages = @('ninja', 'cmake').ForEach({ + $mingwPackages = @('ninja', 'cmake', 'diffutils').ForEach({ "mingw-w64-$arch-$_" }) From 63d8f08b0b04edd110c1b81d0a6e0c3d29ad4464 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 3 Mar 2020 03:51:57 -0500 Subject: [PATCH 2/5] vim-patch:8.1.1279: cannot set 'spellang' to "sr@latin" Problem: Cannot set 'spellang' to "sr@latin". (Bojan Stipic) Solution: Allow using '@' in 'spellang'. (closes vim/vim#4342) https://github.com/vim/vim/commit/9a061cb78ccbf78ec9ae454d37a49edccb4e94fc --- src/nvim/option.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/option.c b/src/nvim/option.c index 8c9c326a28..5a27ff21cc 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -2568,7 +2568,7 @@ static bool valid_filetype(const char_u *val) bool valid_spellang(const char_u *val) 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. From 716bebad486a4364ae5383f7c25aa9919f15143a Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 6 Mar 2020 19:04:42 -0500 Subject: [PATCH 3/5] vim-patch:8.2.0360: yaml files are only recognized by the file extension Problem: Yaml files are only recognized by the file extension. Solution: Check for a line starting with "%YAML". (Jason Franklin) https://github.com/vim/vim/commit/8eab73132838e977092d7b46f70b4ecf6274fd6a --- runtime/scripts.vim | 4 ++++ src/nvim/testdir/test_filetype.vim | 1 + 2 files changed, 5 insertions(+) diff --git a/runtime/scripts.vim b/runtime/scripts.vim index a690431014..c552f0202f 100644 --- a/runtime/scripts.vim +++ b/runtime/scripts.vim @@ -376,6 +376,10 @@ else elseif s:line1 =~? '-\*-.*erlang.*-\*-' set ft=erlang + " YAML + elseif s:line1 =~# '^%YAML' + set ft=yaml + " CVS diff else let s:lnum = 1 diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index 7290cceb0b..9605348389 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -600,6 +600,7 @@ let s:script_checks = { \ 'haskell': [['#!/path/haskell']], \ 'cpp': [['// Standard iostream objects -*- C++ -*-'], \ ['// -*- C++ -*-']], + \ 'yaml': [['%YAML 1.2']], \ } func Test_script_detection() From b00650cfe909313e58aa8181474d7f016d9df94a Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 7 Mar 2020 23:15:25 -0500 Subject: [PATCH 5/5] vim-patch:8.2.0361: internal error when using "0" for a callback Problem: Internal error when using "0" for a callback. Solution: Give a normal error. (closes vim/vim#5743) https://github.com/vim/vim/commit/14e57909e662a43a42438e2701654af48af49b03 --- src/nvim/eval.c | 10 ++++++++++ src/nvim/testdir/test_timers.vim | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/src/nvim/eval.c b/src/nvim/eval.c index f5c5ef9e97..ca0e078e4a 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -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) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT { + int r = OK; + if (arg->v_type == VAR_PARTIAL && arg->vval.v_partial != NULL) { callback->data.partial = arg->vval.v_partial; callback->data.partial->pt_refcount++; 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) { char_u *name = arg->vval.v_string; 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) { callback->type = kCallbackNone; } else { + r = FAIL; + } + + if (r == FAIL) { EMSG(_("E921: Invalid callback argument")); return false; } diff --git a/src/nvim/testdir/test_timers.vim b/src/nvim/testdir/test_timers.vim index 3043103270..40376a877e 100644 --- a/src/nvim/testdir/test_timers.vim +++ b/src/nvim/testdir/test_timers.vim @@ -339,4 +339,8 @@ func Test_nocatch_garbage_collect() delfunc FeedChar endfunc +func Test_timer_invalid_callback() + call assert_fails('call timer_start(0, "0")', 'E921') +endfunc + " vim: shiftwidth=2 sts=2 expandtab