Function: treesit--linecol-at
treesit--linecol-at is a function defined in treesit.c.
Signature
(treesit--linecol-at POS)
Documentation
Test buffer-local linecol cache.
Calculate the line and column at POS using the buffer-local cache, return the line and column in the form of
(LINE . COL)
This is used for internal testing and debugging ONLY.
Source Code
// Defined in /usr/src/emacs/src/treesit.c
{
CHECK_NUMBER (pos);
struct ts_linecol pos_linecol
= treesit_linecol_of_pos (CHAR_TO_BYTE (XFIXNUM (pos)),
BUF_TS_LINECOL_POINT (current_buffer));
return Fcons (make_fixnum (pos_linecol.line), make_fixnum (pos_linecol.col));
}