]> granicus.if.org Git - vim/commitdiff
patch 8.2.4374: unreachable code v8.2.4374
authorBram Moolenaar <Bram@vim.org>
Sun, 13 Feb 2022 21:20:21 +0000 (21:20 +0000)
committerBram Moolenaar <Bram@vim.org>
Sun, 13 Feb 2022 21:20:21 +0000 (21:20 +0000)
Problem:    Unreachable code.
Solution:   Remove outdated code lines.

src/version.c
src/vim9compile.c

index 30547279d9958c901dd9865b744a939138c65ba9..efa15b834143f17dc4598bf98ecd9803915c82ec 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4374,
 /**/
     4373,
 /**/
index 3a70f7a0ffe28e436bcdc9225028e6792573bca5..2494d239f1d82f03b48c9d7572737d8bb7be6e61 100644 (file)
@@ -291,27 +291,7 @@ variable_exists(char_u *name, size_t len, cctx_T *cctx)
     static int
 item_exists(char_u *name, size_t len, int cmd UNUSED, cctx_T *cctx)
 {
-    int            is_global;
-    char_u  *p;
-
-    if (variable_exists(name, len, cctx))
-       return TRUE;
-
-    // This is similar to what is in lookup_scriptitem():
-    // Find a function, so that a following "->" works.
-    // Require "(" or "->" to follow, "Cmd" is a user command while "Cmd()" is
-    // a function call.
-    p = skipwhite(name + len);
-
-    if (name[len] == '(' || (p[0] == '-' && p[1] == '>'))
-    {
-       // Do not check for an internal function, since it might also be a
-       // valid command, such as ":split" versus "split()".
-       // Skip "g:" before a function name.
-       is_global = (name[0] == 'g' && name[1] == ':');
-       return find_func(is_global ? name + 2 : name, is_global) != NULL;
-    }
-    return FALSE;
+    return variable_exists(name, len, cctx);
 }
 
 /*