Skip to main content
Module

x/denops_std/function/mod.ts>bufwinnr

📚 Standard module for denops.vim
Go to Latest
function bufwinnr
import { bufwinnr } from "https://deno.land/x/denops_std@v6.4.0/function/mod.ts";

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()

Returns

Promise<number>