On Di, 10 Jul 2018, Bram Moolenaar wrote:

> Patch 8.1.0177
> Problem:    Defining function in sandbox is inconsistent, cannot use :function
>             but can define a lambda.
> Solution:   Allow defining a function in the sandbox, but also use the sandbox
>             when executing it. (closes #3182)

Now that functions in the sandbox are allowed, I wonder whether we 
should reconsider allowing setbufvar().

Usecase:

Count the number a pattern occurs:

:%s/pattern/\=setbufvar('', 'count', get(b:, 'count', 0)+1)/gne

Currently, this throws E48 

However I am not sure what the exact reason was, why this was forbidden 
in the first place. 


Best,
Christian
-- 
Die Redekunst ist die Kunst des Überredens.
                -- Plato

-- 
-- 
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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui