import { win_execute } from "https://deno.land/x/denops_std@v5.0.2/function/mod.ts";
Like execute()
but in the context of window {id}.
The window will temporarily be made the current window,
without triggering autocommands or changing directory. When
executing {command} autocommands will be triggered, this may
have unexpected side effects. Use :noautocmd
if needed.
Example:
call win_execute(winid, 'set syntax=python')
Doing the same with setwinvar()
would not trigger
autocommands and not actually show syntax highlighting.
Not all commands are allowed in popup windows. When window {id} does not exist then no error is given and an empty string is returned.
Can also be used as a method
, the base is passed as the
second argument:
GetCommand()->win_execute(winid)