mirror of
				https://github.com/vim/vim.git
				synced 2025-10-31 09:57:14 -04:00 
			
		
		
		
	updated for version 7.3.603
Problem:    It is possible to add replace builtin functions by calling
            extend() on g:.
Solution:   Add a flag to a dict to indicate it is a scope.  Check for
            existing functions. (ZyX)
			
			
This commit is contained in:
		| @@ -1,5 +1,6 @@ | ||||
| Test for user functions. | ||||
| Also test an <expr> mapping calling a function. | ||||
| Also test that a builtin function cannot be replaced. | ||||
|  | ||||
| STARTTEST | ||||
| :so small.vim | ||||
| @@ -58,7 +59,10 @@ XX+-XX | ||||
| ---*--- | ||||
| (one | ||||
| (two | ||||
| [(one again:$-5,$w! test.out | ||||
| [(one again:call append(line('$'), max([1, 2, 3])) | ||||
| :call extend(g:, {'max': function('min')}) | ||||
| :call append(line('$'), max([1, 2, 3])) | ||||
| :$-7,$w! test.out | ||||
| :delfunc Table | ||||
| :delfunc Compute | ||||
| :delfunc Expr1 | ||||
|   | ||||
| @@ -4,3 +4,5 @@ XX111-XX | ||||
| 1. one | ||||
| 2. two | ||||
| 1. one again | ||||
| 3 | ||||
| 3 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user