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

x/ddc_vim/deps.ts>fn.virtcol2col

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

The result is a Number, which is the byte index of the character in window {winid} at buffer line {lnum} and virtual column {col}.

If {col} is greater than the last virtual column in line {lnum}, then the byte index of the character at the last virtual column is returned.

The {winid} argument can be the window number or the window-ID. If this is zero, then the current window is used.

Returns -1 if the window {winid} doesn't exist or the buffer line {lnum} or virtual column {col} is invalid.

See also screenpos(), virtcol() and col().

Can also be used as a method:

GetWinid()->virtcol2col(lnum, col)

Parameters

denops: Denops
winid: unknown
lnum: unknown
col: unknown

Returns

Promise<number>