Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/denops_std/function/mod.ts>virtcol2col

๐Ÿ“š Standard module for denops.vim
Go to Latest
function virtcol2col
import { virtcol2col } from "https://deno.land/x/denops_std@v5.0.2/function/mod.ts";

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>