Mercurial > vim
changeset 30325:58fb880f3607 v9.0.0498
patch 9.0.0498: various small issues
Commit: https://github.com/vim/vim/commit/747f110420a0b0f4c2e40e00e8456f1e45b6f0de
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 18 13:06:41 2022 +0100
patch 9.0.0498: various small issues
Problem: Various small issues.
Solution: Various small fixes.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 18 Sep 2022 14:15:06 +0200 |
parents | 0827d3d6d8c0 |
children | 11405d5fc78f |
files | src/arglist.c src/cmdexpand.c src/debugger.c src/findfile.c src/if_xcmdsrv.c src/testdir/test_lambda.vim src/testdir/test_vim9_cmd.vim src/version.c |
diffstat | 8 files changed, 30 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- 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; }
--- 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(
--- 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;
--- 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;
--- 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
--- 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}))
--- 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:')