Skip to main content
Module

x/ddc_vim/deps.ts>fn.cursor

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

Positions the cursor at the column (byte count) {col} in the line {lnum}. The first column is one. When there is one argument {list} this is used as a |List| with two, three or four item: [{lnum}, {col}] [{lnum}, {col}, {off}] [{lnum}, {col}, {off}, {curswant}] This is like the return value of |getpos()| or |getcurpos()|, but without the first item. Does not change the jumplist. If {lnum} is greater than the number of lines in the buffer, the cursor will be positioned at the last line in the buffer. If {lnum} is zero, the cursor will stay in the current line. If {col} is greater than the number of bytes in the line, the cursor will be positioned at the last character in the line. If {col} is zero, the cursor will stay in the current column. If {curswant} is given it is used to set the preferred column for vertical movement. Otherwise {col} is used. When 'virtualedit' is used {off} specifies the offset in screen columns from the start of the character. E.g., a position within a or after the last character. Returns 0 when the position could be set, -1 otherwise. Can also be used as a |method|: GetCursorPos()->cursor()

Parameters

denops: Denops
lnum: number
col: number
optional
off: number

Returns

Promise<number>

Parameters

denops: Denops
list:
[
number,
number,
number,
number,
]

Returns

Promise<number>