Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ddc_vim/deps.ts>fn.bufwinid

Dark deno-powered completion framework for neovim/Vim
Go to Latest
function fn.bufwinid
import { fn } from "https://deno.land/x/ddc_vim@v4.0.2/deps.ts";
const { bufwinid } = fn;

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. See win_findbuf() for finding more.

Can also be used as a method:

FindBuffer()->bufwinid()

Parameters

denops: Denops
buf: BufNameArg

Returns

Promise<number>