aboutsummaryrefslogtreecommitdiff
path: root/editor.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove obsolated functions and tests about line_get_stringdilluti0n2026-07-171-1/+0
|
* refactor: abstract input/rendering modules from main routinedilluti0n2025-05-281-3/+3
| | | | | | This fetch moves raylib-specific logics to redr_raylib.c and input_raylib.c from main routine. Each apis are defined in redr.h and input.h respectively.
* refactor: main draw routine to use eb_get_line_slice instead string.dilluti0n2025-04-291-1/+1
| | | | | Implement helper draw_text_slice which just allocate C-string on the stack and pass it to the DrawText.
* feat: add slice-based accessors for line and editor bufferdilluti0n2025-04-291-1/+2
| | | | | | | | | | | | | | | | | 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.
* refactor: decouple line.h from main.cdilluti0n2025-04-291-1/+1
| | | | | | | | By making eb_get_line a static function within editor.c and introducing API wrappers that internally delegate to eb_get_line and line_get_string, thereby avoiding direct exposure of the line structure. Considering a future transition from C-style null-terminated strings to explicit length-based string management.
* refactor: organize editor.h to look pretty :)dilluti0n2025-04-281-6/+10
|
* add: basic i/o structure on main rendering loopdilluti0n2025-04-281-0/+5
| | | | | eb_bind binds file path to the ed_buf, eb_load_file loads to the buffer if exists and eb_save_file save the buffer to that path.
* refactor: move ed_* modules from main.c to editor.cdilluti0n2025-04-281-0/+21