Commit graph

12 commits

Author SHA1 Message Date
d3b12774c4
refactor: rename Buffer.del_chars to Buffer.delete_bytes 2024-12-19 22:41:26 +01:00
f134fdb747
fix: simplify Buffer.del_chars to use only byte offsets
This is a much faster implementation avoids duplicating work done by
Buffer.get_range. Buffer.get_range also does not have the bug reported
in #83.

The test case was also updated to reflect that get_chars now uses bytes,
instead of columns.

closes #83
2024-12-19 22:36:40 +01:00
5d5b157295
refactor: add test case for #83 2024-12-19 19:36:19 +01:00
df1646d3b1
fix: unittest bitrot 2024-12-19 18:47:20 +01:00
351412231f
refactor: run zig fmt 2024-11-17 20:47:25 +01:00
f0c8e35277
refactor: add basic Buffer.root.get_from_pos test 2024-10-22 19:15:45 +02:00
a5ebaf6202
fix: clean-up bitrot in buffer tests 2024-10-22 19:04:40 +02:00
42ee6459e6 feat: improve performance of incremental re-parsing
We use Buffer.Node.get_byte_pos instead of Buffer.Node.get_range to calculate
tree-sitter edits for incremental parsing. This reduces the number of
egc_length calls required per syntax.edit call to the minimum.
2024-07-29 21:46:34 +02:00
00030759f6 fix(tests): re-enable Buffer.rebalance test 2024-07-08 21:54:26 +02:00
f06a7b3d6a refactor(Buffer): rename Metrix to Metrics
Metrix was a bit too silly
2024-07-05 20:58:24 +02:00
633cc5a1c1 fix(tests): fix buffer tests 2024-07-05 20:53:05 +02:00
4ece4babad Initial public release 2024-02-29 00:00:15 +01:00