Skip to content

Commit

Permalink
patch 9.0.0498: various small issues
Browse files Browse the repository at this point in the history
Problem:    Various small issues.
Solution:   Various small fixes.
  • Loading branch information
brammool committed Sep 18, 2022
1 parent 9712ff1 commit 747f110
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 28 deletions.
6 changes: 4 additions & 2 deletions src/arglist.c
Expand Up @@ -982,7 +982,8 @@ arg_all_close_unused_windows(arg_all_state_T *aall)
{
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;
Expand All @@ -1000,7 +1001,8 @@ arg_all_close_unused_windows(arg_all_state_T *aall)
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;
}
Expand Down
1 change: 1 addition & 0 deletions src/cmdexpand.c
Expand Up @@ -2394,6 +2394,7 @@ expand_cmdline(

/*
* Expand file or directory names.
* Returns OK or FAIL.
*/
static int
expand_files_and_dirs(
Expand Down
2 changes: 1 addition & 1 deletion src/debugger.c
Expand Up @@ -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;

Expand Down
11 changes: 6 additions & 5 deletions src/findfile.c
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/if_xcmdsrv.c
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions src/testdir/test_lambda.vim
Expand Up @@ -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}))
Expand Down
30 changes: 14 additions & 16 deletions src/testdir/test_vim9_cmd.vim
Expand Up @@ -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:')
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -699,6 +699,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
498,
/**/
497,
/**/
Expand Down

0 comments on commit 747f110

Please sign in to comment.