0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 9.0.0498: various small issues

Problem:    Various small issues.
Solution:   Various small fixes.
This commit is contained in:
Bram Moolenaar
2022-09-18 13:06:41 +01:00
parent 9712ff1288
commit 747f110420
8 changed files with 30 additions and 28 deletions

View File

@@ -982,7 +982,8 @@ arg_all_close_unused_windows(arg_all_state_T *aall)
{ {
if (i < aall->alist->al_ga.ga_len if (i < aall->alist->al_ga.ga_len
&& (AARGLIST(aall->alist)[i].ae_fnum == buf->b_fnum && (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)) buf->b_ffname, TRUE, TRUE) & FPC_SAME))
{ {
int weight = 1; int weight = 1;
@@ -1000,7 +1001,8 @@ arg_all_close_unused_windows(arg_all_state_T *aall)
if (i == 0) if (i == 0)
{ {
if (aall->new_curwin != NULL) 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_curwin = wp;
aall->new_curtab = curtab; aall->new_curtab = curtab;
} }

View File

@@ -2394,6 +2394,7 @@ expand_cmdline(
/* /*
* Expand file or directory names. * Expand file or directory names.
* Returns OK or FAIL.
*/ */
static int static int
expand_files_and_dirs( expand_files_and_dirs(

View File

@@ -135,7 +135,7 @@ do_debug(char_u *cmd)
ignore_script = TRUE; 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; n = debug_break_level;
debug_break_level = -1; debug_break_level = -1;

View File

@@ -1934,9 +1934,10 @@ file_name_in_line(
|| ((options & FNAME_HYP) && path_is_url(ptr + len)) || ((options & FNAME_HYP) && path_is_url(ptr + len))
|| (is_url && vim_strchr((char_u *)":?&=", ptr[len]) != NULL)) || (is_url && vim_strchr((char_u *)":?&=", ptr[len]) != NULL))
{ {
// After type:// we also include :, ?, & and = as valid characters, so that // After type:// we also include :, ?, & and = as valid characters, so
// http://google.com:8080?q=this&that=ok works. // that http://google.com:8080?q=this&that=ok works.
if ((ptr[len] >= 'A' && ptr[len] <= 'Z') || (ptr[len] >= 'a' && ptr[len] <= 'z')) if ((ptr[len] >= 'A' && ptr[len] <= 'Z')
|| (ptr[len] >= 'a' && ptr[len] <= 'z'))
{ {
if (in_type && path_is_url(ptr + len + 1)) if (in_type && path_is_url(ptr + len + 1))
is_url = TRUE; is_url = TRUE;

View File

@@ -774,7 +774,7 @@ WaitForReply(void *p)
/* /*
* Wait for replies from id (win) * Wait for replies from id (win)
* When "timeout" is non-zero wait up to this many seconds. * 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. * Return -1 if the window becomes invalid while waiting.
*/ */
int int

View File

@@ -251,9 +251,7 @@ endfunc
func Test_lambda_combination() func Test_lambda_combination()
call assert_equal(2, {x -> {x -> x}}(1)(2)) call assert_equal(2, {x -> {x -> x}}(1)(2))
call assert_equal(10, {y -> {x -> x(y)(10)}({y -> y})}({z -> z})) 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)) call assert_equal(5.0, {x -> {y -> x / y}}(10)(2.0))
endif
call assert_equal(6, {x -> {y -> {z -> x + y + z}}}(1)(2)(3)) 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})) call assert_equal(6, {x -> {f -> f(x)}}(3)({x -> x * 2}))

View File

@@ -52,7 +52,6 @@ def Test_vim9cmd()
END END
v9.CheckScriptFailure(lines, 'E115:') v9.CheckScriptFailure(lines, 'E115:')
if has('float')
lines =<< trim END lines =<< trim END
vim9script vim9script
echo .10 echo .10
@@ -67,7 +66,6 @@ def Test_vim9cmd()
legacy echo .10 legacy echo .10
END END
v9.CheckScriptFailure(lines, 'E15:') v9.CheckScriptFailure(lines, 'E15:')
endif
echo v:version echo v:version
assert_fails('vim9cmd echo version', 'E121:') assert_fails('vim9cmd echo version', 'E121:')

View File

@@ -699,6 +699,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
498,
/**/ /**/
497, 497,
/**/ /**/