Patch 8.2.4374

6 views
Skip to first unread message

Bram Moolenaar

unread,
Feb 13, 2022, 4:20:57 PM2/13/22
to vim...@googlegroups.com

Patch 8.2.4374
Problem: Unreachable code.
Solution: Remove outdated code lines.
Files: src/vim9compile.c


*** ../vim-8.2.4373/src/vim9compile.c 2022-02-12 19:52:22.024702251 +0000
--- src/vim9compile.c 2022-02-13 21:18:44.002962590 +0000
***************
*** 291,317 ****
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;
}

/*
--- 291,297 ----
static int
item_exists(char_u *name, size_t len, int cmd UNUSED, cctx_T *cctx)
{
! return variable_exists(name, len, cctx);
}

/*
*** ../vim-8.2.4373/src/version.c 2022-02-13 20:46:14.693026120 +0000
--- src/version.c 2022-02-13 21:19:23.442894513 +0000
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 4374,
/**/

--
Portable Computer: A device invented to force businessmen
to work at home, on vacation, and on business trips.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages