import { fn } from "https://deno.land/x/ddc_vim@v3.8.0/deps.ts";
const { islocked } = fn;
The result is a Number, which is TRUE
when {expr} is the
name of a locked variable.
The string argument {expr} must be the name of a variable,
List
item or Dictionary
entry, not the variable itself!
Example:
:let alist = [0, ['a', 'b'], 2, 3]
:lockvar 1 alist
:echo islocked('alist') " 1
:echo islocked('alist[1]') " 0
When {expr} is a variable that does not exist -1 is returned.
If {expr} uses a range, list or dict index that is out of
range or does not exist you get an error message. Use
exists()
to check for existence.
In Vim9 script it does not work for local function variables.
Can also be used as a method
:
GetName()->islocked()
Parameters
denops: Denops