Commit graph

19 commits

Author SHA1 Message Date
c7b46856bb refactor: explicity publish internal helix functions for unittests only
We don't want internal functions in the mode specific extention modules becoming
shared code. To avoid this, mark the functions as private and publish only through
a structure marked clearly as for testing only.

If these functions are useful as shared code they can be moved to the editor module
or else where.
2025-10-10 09:35:44 +02:00
Igor Támara
a6f5ffcdc5 hx: add tests for some Helix mode movements 2025-10-10 09:35:44 +02:00
a5dc6d8a43 fix: build of helix_mode tests 2025-10-10 09:35:44 +02:00
Igor Támara
a64d7c3afa hx: attempt to add tests in separate file 2025-10-10 09:35:44 +02:00
91d2131dac
fix: update Buffer tests for zig-0.15 2025-09-26 21:48:20 +02:00
935b178d89
feat: add Buffer.Node.byte_offset_to_line_and_col and testcase 2025-09-17 22:17:00 +02:00
1658c9e3b4
refactor: add crlf mode testcase for Buffer.Node.get_byte_pos 2025-09-17 22:16:07 +02:00
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