0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.0.0343: b:changedtick can be unlocked

Problem:    b:changedtick can be unlocked, even though it has no effect.
            (Nikolai Pavlov)
Solution:   Add a check and error E940. (closes #1496)
This commit is contained in:
Bram Moolenaar
2017-02-20 22:35:33 +01:00
parent 673911457d
commit e7877fe0de
4 changed files with 24 additions and 7 deletions

View File

@@ -9082,9 +9082,12 @@ This does NOT work: >
:lockvar v
:let v = 'asdf' " fails!
:unlet v
< *E741*
< *E741* *E940*
If you try to change a locked variable you get an
error message: "E741: Value is locked: {name}"
error message: "E741: Value is locked: {name}".
If you try to lock or unlock a built-in variable you
get an error message: "E940: Cannot lock or unlock
variable {name}".
[depth] is relevant when locking a |List| or
|Dictionary|. It specifies how deep the locking goes: