Vim9: Using :filter command fails from a compiled function

7 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Jun 2, 2021, 11:11:19 AM6/2/21
to vim_dev
Hi,

I am not able to use the :filter command from a Vim9 function:

--------------------------------------------
vim9script
def F1()
filter assert registers
enddef
F1()
--------------------------------------------

Sourcing the above script, results in "E476: Invalid command: filter assert".
If I try to use ":filter" (a colon before the command), I get the same error.
I had to use "echo execute('filter eval oldfiles')" to make this work. Is this
the expected behavior?

I am able to use this outside of a compiled function:

--------------------------------------------
vim9script
filter assert registers
--------------------------------------------

Thanks,
Yegappan
Reply all
Reply to author
Forward
0 new messages