beetlebug▾
/

ztcl::vt cursor

Gives the place of the cursor.

ztcl::vt cursor HANDLE

Description

Gives the list X Y of the cursor in the active area, from 0.

Arguments

ArgumentTypeDefaultDescription
HANDLEhandlerequiredA handle from new.

Returns

A list of two integers.

Examples

Each example of this page runs after package require ztcl::vt; set vt [ztcl::vt new].

% set t [ztcl::vt new]
> ztcl::vt feed $t "\x1b\[3;5H"
> set r [ztcl::vt cursor $t]
> ztcl::vt delete $t
> set r
4 2

Errors

% ztcl::vt cursor vt99
can not find terminal "vt99"
-errorcode ZTCL VT HANDLE

% ztcl::vt cursor $vt x
wrong # args: should be "ztcl::vt cursor handle"
-errorcode TCL WRONGARGS

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztcl 1.0.0-beta.1

See also