forked from aniani/vim
patch 9.0.1611: v:maxcol can be changed in a :for loop
Problem: v:maxcol can be changed in a :for loop. Solution: Check for read-only loop variable. (closes #12470)
This commit is contained in:
@@ -3842,7 +3842,8 @@ set_var_const(
|
||||
}
|
||||
|
||||
if ((flags & ASSIGN_FOR_LOOP) == 0
|
||||
&& var_check_permission(di, name) == FAIL)
|
||||
? var_check_permission(di, name) == FAIL
|
||||
: var_check_ro(di->di_flags, name, FALSE))
|
||||
goto failed;
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user