mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
updated for version 7.4.268
Problem: Using exists() on a funcref for a script-local function does not work. Solution: Translate <SNR> to the special byte sequence. Add a test.
This commit is contained in:
@@ -22275,6 +22275,14 @@ trans_function_name(pp, skip, flags, fdp)
|
||||
{
|
||||
name = vim_strsave(name);
|
||||
*pp = end;
|
||||
if (STRNCMP(name, "<SNR>", 5) == 0)
|
||||
{
|
||||
/* Change "<SNR>" to the byte sequence. */
|
||||
name[0] = K_SPECIAL;
|
||||
name[1] = KS_EXTRA;
|
||||
name[2] = (int)KE_SNR;
|
||||
mch_memmove(name + 3, name + 5, STRLEN(name + 5) + 1);
|
||||
}
|
||||
goto theend;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user