]> granicus.if.org Git - vim/commitdiff
patch 9.0.0498: various small issues v9.0.0498
authorBram Moolenaar <Bram@vim.org>
Sun, 18 Sep 2022 12:06:41 +0000 (13:06 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 18 Sep 2022 12:06:41 +0000 (13:06 +0100)
Problem:    Various small issues.
Solution:   Various small fixes.

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

index e44682fa4cb38f9d061f5d1653751fafb4eeefb6..06398e2070a969f35eebe5baf5438f2e482aa860 100644 (file)
@@ -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;
                            }
index 57bf47a1bac4634cdfca8e935bc359467481cbd7..e0ad1a77f26eeb1cefe283a9ce800d55d60b69f4 100644 (file)
@@ -2394,6 +2394,7 @@ expand_cmdline(
 
 /*
  * Expand file or directory names.
+ * Returns OK or FAIL.
  */
     static int
 expand_files_and_dirs(
index 235d493d5819c813dc6d491fd5a2c653e5afb9f5..4a325505aef1b5abd26bd589241bc8354de3223d 100644 (file)
@@ -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;
 
index c3089274b24d56874c981e2b17afe60e9b84e3bd..5751a07270c281cf2111180bd9afa310626db544 100644 (file)
@@ -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;
index 20427c74846f82bba4cb34947982f4850087e4c9..1f6b8d212f2a0afe749f998ef893a4e6ebd71cf3 100644 (file)
@@ -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
index 130a08108b26e09aee781baeda991353870b3220..1a69a9bfa52d16316350d0724a91857abbc02d38 100644 (file)
@@ -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}))
index 80b78205aef94cc557017acf03ec405b4681d454..1a3f5df82c056facf614b4bd59797c5f67f5d4b1 100644 (file)
@@ -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:')
index e4c8ce5e06caea5c03deb55b32a4f37fb93743a0..16ba3ee25790703dc78277098126d2c273b197bd 100644 (file)
@@ -699,6 +699,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    498,
 /**/
     497,
 /**/