vim-patch:7.4.419

Problem:    Whan part of a list is locked it's possible to make changes.
Solution:   Check if any of the list items is locked before make a change.
            (ZyX)

https://code.google.com/p/vim/source/detail?r=v7-4-419
This commit is contained in:
Scott Prager
2014-10-21 10:20:59 -04:00
parent e450c541dd
commit 96be11f609
4 changed files with 48 additions and 1 deletions

View File

@@ -282,6 +282,21 @@ let l = [0, 1, 2, 3]
: $put =ps
: endfor
:endfor
:unlet l
:let l = [1, 2, 3, 4]
:lockvar! l
:$put =string(l)
:unlockvar l[1]
:unlet l[0:1]
:$put =string(l)
:unlet l[1:2]
:$put =string(l)
:unlockvar l[1]
:let l[0:1] = [0, 1]
:$put =string(l)
:let l[1:2] = [0, 1]
:$put =string(l)
:unlet l
:" :lockvar/islocked() triggering script autoloading
:set rtp+=./sautest
:lockvar g:footest#x

View File

@@ -86,6 +86,11 @@ FFFFFFF
FFpFFpp
0000-000
ppppppp
[1, 2, 3, 4]
[1, 2, 3, 4]
[1, 2, 3, 4]
[1, 2, 3, 4]
[1, 2, 3, 4]
locked g:footest#x:-1
exists g:footest#x:0
g:footest#x: 1