Skip to main content
Module

x/denops_std/function/mod.ts>getwinpos

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

The result is a List with two numbers, the result of getwinposx() and getwinposy() combined: [x-pos, y-pos] {timeout} can be used to specify how long to wait in msec for a response from the terminal. When omitted 100 msec is used. Use a longer time for a remote terminal. When using a value less than 10 and no response is received within that time, a previously reported position is returned, if available. This can be used to poll for the position and do some work in the meantime:

while 1
  let res = getwinpos(1)
  if res[0] >= 0
    break
  endif
  " Do some work here
endwhile

Can also be used as a method:

GetTimeout()->getwinpos()

Parameters

denops: Denops
optional
timeout: unknown

Returns

Promise<unknown[]>