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

x/denops_std/function/vim/mod.ts>term_getcursor

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

Get the cursor position of terminal {buf}. Returns a list with two numbers and a dictionary: [row, col, dict].

"row" and "col" are one based, the first screen cell is row 1, column 1. This is the cursor position of the terminal itself, not of the Vim window.

"dict" can have these members: "visible" one when the cursor is visible, zero when it is hidden. "blink" one when the cursor is blinking, zero when it is not blinking. "shape" 1 for a block cursor, 2 for underline and 3 for a vertical bar. "color" color of the cursor, e.g. "green"

{buf} must be the buffer number of a terminal window. If the buffer does not exist or is not a terminal window, an empty list is returned.

Can also be used as a method:

GetBufnr()->term_getcursor()

Parameters

denops: Denops
buf: unknown

Returns

Promise<unknown[]>