]> git.eshelyaron.com Git - emacs.git/commit
Fix 'treesit-max-buffer-size' and its use
authorEli Zaretskii <eliz@gnu.org>
Tue, 22 Nov 2022 18:22:41 +0000 (20:22 +0200)
committerEli Zaretskii <eliz@gnu.org>
Tue, 22 Nov 2022 18:22:41 +0000 (20:22 +0200)
commit368d2531bec84c2e75b2fd2f32bb59fc2e7ee520
treedf31e2d30bd5aa7aa06e9ce5838750f2ee3dcbce
parentfa567684fa276511ea981cd208f99b67c521d8aa
Fix 'treesit-max-buffer-size' and its use

* lisp/treesit.el (treesit-max-buffer-size): Avoid overflow in
computing buffer-size limit.  Account for 32-but systems built
"--with-wide-int".  Extend doc string.
(treesit-ready-p): Compare the limit with the size of the buffer
in bytes, not in characters.

* src/treesit.c (treesit_check_buffer_size): Measure buffer size
in bytes.
lisp/treesit.el
src/treesit.c