diff options
author | Yuan Fu <casouri@gmail.com> | 2023-12-23 16:47:04 -0800 |
---|---|---|
committer | Yuan Fu <casouri@gmail.com> | 2023-12-23 18:43:51 -0800 |
commit | 683c7c96871cc374b0e00f5084e43a70fc3ec36a (patch) | |
tree | 1760611714cff37dae563e0b37be9925792d2a5b /test/lisp/emacs-lisp/checkdoc-tests.el | |
parent | 8ae42c825e1e058d3c736837a023bdc2617b85a2 (diff) | |
download | emacs-683c7c96871cc374b0e00f5084e43a70fc3ec36a.tar.gz emacs-683c7c96871cc374b0e00f5084e43a70fc3ec36a.tar.bz2 emacs-683c7c96871cc374b0e00f5084e43a70fc3ec36a.zip |
Increment parser timestamp when narrowing changes (bug#67977)
When narrowing changes, parse reparses, so the timestamp should
definitely increment, just like in ts_record_changes.
Failing to increment this timestamp, outdated nodes would think they
are still up-to-date, and try to print their type name. Printing
their type name involves accessing the old parse tree, which is
already freed during the last reparse.
I also found that we don't increment timestamp when changing parser
ranges and fixed that as well.
* src/treesit.c (treesit_sync_visible_region):
(Ftreesit_parser_set_included_ranges): Increment timestamp.
* src/treesit.h (Lisp_TS_Parser): Add some comments.
Diffstat (limited to 'test/lisp/emacs-lisp/checkdoc-tests.el')
0 files changed, 0 insertions, 0 deletions