mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
updated for version 7.3.1068
Problem: Python: Script is auto-loaded on function creation. Solution: Python patch 27. (ZyX)
This commit is contained in:
@@ -2015,19 +2015,13 @@ FunctionNew(PyTypeObject *subtype, char_u *name)
|
||||
func_ref(self->name);
|
||||
}
|
||||
else
|
||||
{
|
||||
self->name = get_expanded_name(name, TRUE);
|
||||
if (self->name == NULL)
|
||||
if ((self->name = get_expanded_name(name,
|
||||
vim_strchr(name, AUTOLOAD_CHAR) == NULL))
|
||||
== NULL)
|
||||
{
|
||||
if (script_autoload(name, TRUE) && !aborting())
|
||||
self->name = get_expanded_name(name, TRUE);
|
||||
if (self->name == NULL)
|
||||
{
|
||||
PyErr_SetString(PyExc_ValueError, _("function does not exist"));
|
||||
return NULL;
|
||||
}
|
||||
PyErr_SetString(PyExc_ValueError, _("function does not exist"));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return (PyObject *)(self);
|
||||
}
|
||||
|
Reference in New Issue
Block a user