<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rayedit.git/slice.h, branch master</title>
<subtitle>Text editor for large files
</subtitle>
<id>http://git.dilluti0n.com/rayedit.git/atom?h=master</id>
<link rel='self' href='http://git.dilluti0n.com/rayedit.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/rayedit.git/'/>
<updated>2025-04-29T12:56:40Z</updated>
<entry>
<title>feat: add slice-based accessors for line and editor buffer</title>
<updated>2025-04-29T12:56:40Z</updated>
<author>
<name>dilluti0n</name>
<email>hskimse1@gmail.com</email>
</author>
<published>2025-04-29T12:53:27Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/rayedit.git/commit/?id=5e4cb3121fd3eaf9ed6b6887e8010f6a80ed0f3d'/>
<id>urn:sha1:5e4cb3121fd3eaf9ed6b6887e8010f6a80ed0f3d</id>
<content type='text'>
This adds `line_get_slice` and `eb_get_line_slice`, enabling
slice-style (pointer + length) access to line contents without
requiring materialization into a null-terminated string.

- `line_get_slice` returns either the original mmap'd buffer (if the
- line is lazy) or the materialized vector contents (if edited).
- `eb_get_line_slice` wraps `line_get_slice` to provide safe access at
- the editor buffer level.  Update `line.h` and `editor.h` headers to
- declare the new functions.  Minor documentation improvements to
- clarify "init", "modify", and "get" function categories.

This prepares the codebase for transitioning away from C-string
dependency where possible, improving efficiency and avoiding
unnecessary memory copies.
</content>
</entry>
</feed>
