# HG changeset patch # User Bram Moolenaar # Date 1663503306 -7200 # Node ID 58fb880f3607d2f86c6afc6c63466e44feeaedf0 # Parent 0827d3d6d8c03522505ce0b367ab64a5857e4c82 patch 9.0.0498: various small issues Commit: https://github.com/vim/vim/commit/747f110420a0b0f4c2e40e00e8456f1e45b6f0de Author: Bram Moolenaar Date: Sun Sep 18 13:06:41 2022 +0100 patch 9.0.0498: various small issues Problem: Various small issues. Solution: Various small fixes. diff --git a/src/arglist.c b/src/arglist.c --- a/src/arglist.c +++ b/src/arglist.c @@ -982,7 +982,8 @@ arg_all_close_unused_windows(arg_all_sta { if (i < aall->alist->al_ga.ga_len && (AARGLIST(aall->alist)[i].ae_fnum == buf->b_fnum - || fullpathcmp(alist_name(&AARGLIST(aall->alist)[i]), + || fullpathcmp(alist_name( + &AARGLIST(aall->alist)[i]), buf->b_ffname, TRUE, TRUE) & FPC_SAME)) { int weight = 1; @@ -1000,7 +1001,8 @@ arg_all_close_unused_windows(arg_all_sta if (i == 0) { if (aall->new_curwin != NULL) - aall->new_curwin->w_arg_idx = aall->opened_len; + aall->new_curwin->w_arg_idx = + aall->opened_len; aall->new_curwin = wp; aall->new_curtab = curtab; } diff --git a/src/cmdexpand.c b/src/cmdexpand.c --- a/src/cmdexpand.c +++ b/src/cmdexpand.c @@ -2394,6 +2394,7 @@ expand_cmdline( /* * Expand file or directory names. + * Returns OK or FAIL. */ static int expand_files_and_dirs( diff --git a/src/debugger.c b/src/debugger.c --- a/src/debugger.c +++ b/src/debugger.c @@ -135,7 +135,7 @@ do_debug(char_u *cmd) ignore_script = TRUE; } - // don't debug any function call, e.g. from an expresion mapping + // don't debug any function call, e.g. from an expression mapping n = debug_break_level; debug_break_level = -1; diff --git a/src/findfile.c b/src/findfile.c --- a/src/findfile.c +++ b/src/findfile.c @@ -1931,12 +1931,13 @@ file_name_in_line( */ len = 0; while (vim_isfilec(ptr[len]) || (ptr[len] == '\\' && ptr[len + 1] == ' ') - || ((options & FNAME_HYP) && path_is_url(ptr + len)) - || (is_url && vim_strchr((char_u *)":?&=", ptr[len]) != NULL)) + || ((options & FNAME_HYP) && path_is_url(ptr + len)) + || (is_url && vim_strchr((char_u *)":?&=", ptr[len]) != NULL)) { - // After type:// we also include :, ?, & and = as valid characters, so that - // http://google.com:8080?q=this&that=ok works. - if ((ptr[len] >= 'A' && ptr[len] <= 'Z') || (ptr[len] >= 'a' && ptr[len] <= 'z')) + // After type:// we also include :, ?, & and = as valid characters, so + // that http://google.com:8080?q=this&that=ok works. + if ((ptr[len] >= 'A' && ptr[len] <= 'Z') + || (ptr[len] >= 'a' && ptr[len] <= 'z')) { if (in_type && path_is_url(ptr + len + 1)) is_url = TRUE; diff --git a/src/if_xcmdsrv.c b/src/if_xcmdsrv.c --- a/src/if_xcmdsrv.c +++ b/src/if_xcmdsrv.c @@ -774,7 +774,7 @@ WaitForReply(void *p) /* * Wait for replies from id (win) * When "timeout" is non-zero wait up to this many seconds. - * Return 0 and the malloc'ed string when a reply is available. + * Return 0 and the allocated string in "*str" when a reply is available. * Return -1 if the window becomes invalid while waiting. */ int diff --git a/src/testdir/test_lambda.vim b/src/testdir/test_lambda.vim --- a/src/testdir/test_lambda.vim +++ b/src/testdir/test_lambda.vim @@ -251,9 +251,7 @@ endfunc func Test_lambda_combination() call assert_equal(2, {x -> {x -> x}}(1)(2)) call assert_equal(10, {y -> {x -> x(y)(10)}({y -> y})}({z -> z})) - if has('float') - call assert_equal(5.0, {x -> {y -> x / y}}(10)(2.0)) - endif + call assert_equal(5.0, {x -> {y -> x / y}}(10)(2.0)) call assert_equal(6, {x -> {y -> {z -> x + y + z}}}(1)(2)(3)) call assert_equal(6, {x -> {f -> f(x)}}(3)({x -> x * 2})) diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim --- a/src/testdir/test_vim9_cmd.vim +++ b/src/testdir/test_vim9_cmd.vim @@ -52,22 +52,20 @@ def Test_vim9cmd() END v9.CheckScriptFailure(lines, 'E115:') - if has('float') - lines =<< trim END - vim9script - echo .10 - END - v9.CheckScriptSuccess(lines) - lines =<< trim END - vim9cmd echo .10 - END - v9.CheckScriptSuccess(lines) - lines =<< trim END - vim9script - legacy echo .10 - END - v9.CheckScriptFailure(lines, 'E15:') - endif + lines =<< trim END + vim9script + echo .10 + END + v9.CheckScriptSuccess(lines) + lines =<< trim END + vim9cmd echo .10 + END + v9.CheckScriptSuccess(lines) + lines =<< trim END + vim9script + legacy echo .10 + END + v9.CheckScriptFailure(lines, 'E15:') echo v:version assert_fails('vim9cmd echo version', 'E121:') diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -700,6 +700,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 498, +/**/ 497, /**/ 496,