Skip to main content
Module

x/ddc_vim/deps.ts>fn.screenpos

Dark deno-powered completion framework for neovim/Vim8
Go to Latest
function fn.screenpos
import { fn } from "https://deno.land/x/ddc_vim@v2.3.0/deps.ts";
const { screenpos } = fn;

The result is a Dict with the screen position of the text character in window {winid} at buffer line {lnum} and column {col}. {col} is a one-based byte index. The Dict has these members: row screen row col first screen column endcol last screen column curscol cursor screen column If the specified position is not visible, all values are zero. The "endcol" value differs from "col" when the character occupies more than one screen cell. E.g. for a Tab "col" can be 1 and "endcol" can be 8. The "curscol" value is where the cursor would be placed. For a Tab it would be the same as "endcol", while for a double width character it would be the same as "col". Can also be used as a |method|: GetWinid()->screenpos(lnum, col)

Parameters

denops: Denops
winid: number | string
lnum: number
col: number

Returns

Promise<Partial<ScreenPos>>