Skip to main content
Module

x/ddc_vim/deps.ts>fn.bufwinnr

Dark deno-powered completion framework for neovim/Vim
Latest
function fn.bufwinnr
import { fn } from "https://deno.land/x/ddc_vim@v4.3.1/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()

Returns

Promise<number>