summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-09-18 13:06:41 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-18 13:06:41 +0100
commit747f110420a0b0f4c2e40e00e8456f1e45b6f0de (patch)
tree0d72c76dc650a6f4767a219ca22285b1be2950c8 /src
parent9712ff1288f942736ed76c0dec014909f067eec9 (diff)
patch 9.0.0498: various small issuesv9.0.0498
Problem: Various small issues. Solution: Various small fixes.
Diffstat (limited to 'src')
-rw-r--r--src/arglist.c6
-rw-r--r--src/cmdexpand.c1
-rw-r--r--src/debugger.c2
-rw-r--r--src/findfile.c11
-rw-r--r--src/if_xcmdsrv.c2
-rw-r--r--src/testdir/test_lambda.vim4
-rw-r--r--src/testdir/test_vim9_cmd.vim30
-rw-r--r--src/version.c2
8 files changed, 30 insertions, 28 deletions
diff --git a/src/arglist.c b/src/arglist.c
index e44682fa4c..06398e2070 100644
--- a/src/arglist.c
+++ b/src/arglist.c
@@ -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;
@@ -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;
}
diff --git a/src/cmdexpand.c b/src/cmdexpand.c
index 57bf47a1ba..e0ad1a77f2 100644
--- 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
index 235d493d58..4a325505ae 100644
--- 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
index c3089274b2..5751a07270 100644
--- 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
index 20427c7484..1f6b8d212f 100644
--- 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
index 130a08108b..1a69a9bfa5 100644
--- 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
index 80b78205ae..1a3f5df82c 100644
--- 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
index e4c8ce5e06..16ba3ee257 100644
--- 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,