aboutsummaryrefslogtreecommitdiff
path: root/test_line.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove obsolated functions and tests about line_get_stringdilluti0n2026-07-171-48/+15
|
* fix: double-free of line object in eb_backspace and eb_delete_linedilluti0n2025-05-141-1/+1
| | | | | | | | On eb_backspace, when the upper line was non-null, line_cat followed by line_free, and eb_delete_line only cleared the line_vec. However, commit 2441e78 introduced an additional line_free in eb_delete_line to fix a memory leak, which led to a double-free for that line. This patch resolves that problem.
* refactor: deprecate line->cursor; simplify vertical cursor movementdilluti0n2025-05-021-1/+0
| | | | | | | | | This patch removes the per-line cursor cache (`line->cursor`), reducing implementation complexity. Vertical cursor movement (up/down) now uniformly places the cursor at the beginning of the line, instead of trying to restore the previous horizontal position. UX considerations such as column preservation will be revisited after core stabilization.
* test: update test_line.c to test lazy-loaded linesdilluti0n2025-04-291-10/+71
|
* remove: line->last to reduce ambiguity.dilluti0n2025-04-291-17/+0
| | | | | | | | | | vec_len is O(1) and it would be fast enough to use it. introduce line_lazy_init for lazy load (allocate each line when actually edit it!) per line. [minor] remove obsolate line_delete_trailing.
* refactor: line_test.cdilluti0n2025-04-281-10/+23
|
* implement: unittest for line.cdilluti0n2025-04-281-16/+134
|
* refactor: move tests to seperate filesdilluti0n2025-04-281-0/+43
test.c to *_line.c and *_vector.c also implement unit test vector_suite::resize too.