updated for version 7.3.1068
Problem: Python: Script is auto-loaded on function creation.
Solution: Python patch 27. (ZyX)
diff --git a/src/if_py_both.h b/src/if_py_both.h
index e31509c..5fe0476 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -2015,19 +2015,13 @@
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);
}