summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/subr-x-tests.el
diff options
context:
space:
mode:
authorYuan Fu <casouri@gmail.com>2022-12-05 18:37:47 -0800
committerYuan Fu <casouri@gmail.com>2022-12-05 19:56:47 -0800
commitc26fe45cb8046eecaf3a74e3e7d4bc62ab511a8c (patch)
tree3cdc961f440fa79f0d9c48901c9f961d525787a8 /test/lisp/emacs-lisp/subr-x-tests.el
parent318bf42b410d4a8ecf0e8ff64280cfd655884877 (diff)
downloademacs-c26fe45cb8046eecaf3a74e3e7d4bc62ab511a8c.tar.gz
emacs-c26fe45cb8046eecaf3a74e3e7d4bc62ab511a8c.tar.bz2
emacs-c26fe45cb8046eecaf3a74e3e7d4bc62ab511a8c.zip
Fix treesit-query-capture
Before this change Ftreesit_query_capture doesn't convert character position to byte position for BEG and END parameters. I observed fontification issue in css files but couldn't figure out why, now I know :-) I decide to keep treesit--font-lock-query-expand-range, since it might provide a escape hatch for problems we discover in the future, and it should be very cheap so no downside of keeping it. * lisp/textmodes/css-mode.el (css-ts-mode): Stop setting treesit--font-lock-query-expand-range. * lisp/treesit.el (treesit--font-lock-query-expand-range): Update docstring. * src/treesit.c (Ftreesit_query_capture): Convert BEG and END to byte position. Also added parentheses wround "beg_byte - visible_beg" in the call to ts_query_cursor_set_byte_range (i.e., style change).
Diffstat (limited to 'test/lisp/emacs-lisp/subr-x-tests.el')
0 files changed, 0 insertions, 0 deletions