import { fn } from "https://deno.land/x/ddc_vim@v4.0.2/deps.ts";
const { getcharpos } = fn;
Get the position for String {expr}. Same as getpos()
but the
column number in the returned List is a character index
instead of a byte index.
If getpos()
returns a very large column number, equal to
v:maxcol
, then getcharpos() will return the character index
of the last character.
Example: With the cursor on '세' in line 5 with text "여보세요":
getcharpos('.') returns [0, 5, 3, 0]
getpos('.') returns [0, 5, 7, 0]
Can also be used as a method
:
GetMark()->getcharpos()
Parameters
denops: Denops