Skip to main content
Module

x/denops_std/function/buffer.ts>bufwinid

📚 Standard module for denops.vim
Go to Latest
function bufwinid
import { bufwinid } from "https://deno.land/x/denops_std@v4.1.4/function/buffer.ts";

The result is a Number, which is the |window-ID| of the first window associated with buffer {buf}. For the use of {buf}, see |bufname()| above. If buffer {buf} doesn't exist or there is no such window, -1 is returned. Example:

echo "A window containing buffer 1 is " .. (bufwinid(1))

Only deals with the current tab page.

Can also be used as a |method|: FindBuffer()->bufwinid()

Parameters

denops: Denops
buf: string | number

Returns

Promise<number>