mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 8.2.0150: cannot define python function when using :execute
Problem: Cannot define python function when using :execute. (Yasuhiro Matsumoto) Solution: Do not recognize "def" inside "function.
This commit is contained in:
@@ -2667,8 +2667,11 @@ ex_function(exarg_T *eap)
|
||||
indent += 2;
|
||||
|
||||
// Check for defining a function inside this function.
|
||||
// Only recognize "def" inside "def", not inside "function",
|
||||
// For backwards compatibility, see Test_function_python().
|
||||
c = *p;
|
||||
if (checkforcmd(&p, "function", 2) || checkforcmd(&p, "def", 3))
|
||||
if (checkforcmd(&p, "function", 2)
|
||||
|| (eap->cmdidx == CMD_def && checkforcmd(&p, "def", 3)))
|
||||
{
|
||||
if (*p == '!')
|
||||
p = skipwhite(p + 1);
|
||||
|
Reference in New Issue
Block a user