0
0
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:
Bram Moolenaar
2013-05-30 13:37:28 +02:00
parent 305b2fde13
commit 018acca3bd
7 changed files with 14 additions and 19 deletions

View File

@@ -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);
}