import { setcmdpos } from "https://deno.land/x/denops_std@v5.0.2/function/mod.ts";
Set the cursor position in the command line to byte position
{pos}. The first position is 1.
Use getcmdpos()
to obtain the current position.
Only works while editing the command line, thus you must use
c_CTRL-\_e
, c_CTRL-R_=
or c_CTRL-R_CTRL-R
with '='. For
c_CTRL-\_e
and c_CTRL-R_CTRL-R
with '=' the position is
set after the command line is set to the expression. For
c_CTRL-R_=
it is set after evaluating the expression but
before inserting the resulting text.
When the number is too big the cursor is put at the end of the
line. A number smaller than one has undefined results.
Returns 0 when successful, 1 when not editing the command
line.
Can also be used as a method
:
GetPos()->setcmdpos()
Parameters
denops: Denops