import { fn } from "https://deno.land/x/ddc_vim@v4.0.2/deps.ts";
const { bufwinnr } = fn;
Like bufwinid()
but return the window number instead of the
window-ID
.
If buffer {buf} doesn't exist or there is no such window, -1
is returned. Example:
echo "A window containing buffer 1 is " .. (bufwinnr(1))
The number can be used with CTRL-W_w
and ":wincmd w"
:wincmd
.
Can also be used as a method
:
FindBuffer()->bufwinnr()
Parameters
denops: Denops
buf: BufNameArg