Hi,

On Thu, Aug 26, 2021 at 7:22 PM Shane-XB-Qian <[email protected]>
wrote:

> @brammool <https://github.com/brammool> @yegappan
> <https://github.com/yegappan>
> bnr->setbufvar('&buflisted', true)
> // "expected string but got bool"
>

The new variable value is the base argument for the setbufvar()
method call and the buffer number is not the base argument.

>From the help for setbufvar:

    Can also be used as a method, the base is passed as the
    third argument:
        GetValue()->setbufvar(buf, varname)

So you need to use

     true->setbufvar(bnr, '&buflisted')

- Yegappan


> doc:
>
> In Vim9 script one can use "true" for v:true, "false" for v:false and "null"
> for v:null.
>
>
>

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAAW7x7m8kMd0dV_d_uuytJ1BiDHgmmtCcbyDLMo9bFYL%2B%3DocNw%40mail.gmail.com.

Raspunde prin e-mail lui