| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Long time no see, I thought there was some problem at first.
|
| | |
|
| | |
|
| |
|
|
| |
or an unallocated line
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed draw offsets and added scroll guard to not to try draw
non-existing parts and produce this:
(gdb) bt
#0 0x00007ffff7daba3c in ?? () from /usr/lib64/libc.so.6
#1 0x00007ffff7d51bd6 in raise () from /usr/lib64/libc.so.6
#2 0x00007ffff7d3930d in abort () from /usr/lib64/libc.so.6
#3 0x00007ffff7d39275 in ?? () from /usr/lib64/libc.so.6
#4 0x000055555555d7a5 in Vec_slinep_get (v=0x555555ae1ea0, index=50) at editor.c:20
#5 0x000055555555d950 in eb_get_line (eb=0x555556479b50, index=50) at editor.c:67
#6 0x000055555555e18b in eb_get_line_slice (eb=0x555556479b50, pos=50, sl=0x7fffffffc6e0) at editor.c:255
#7 0x0000555555560c98 in view_eb_draw (veb=0x555556258100) at view.c:220
#8 0x00005555555607d9 in view_draw_under (root=0x555556689000) at view.c:155
#9 0x000055555555fc78 in main (argc=2, argv=0x7fffffffd8c8) at main.c:47
I mean... what I were doing last year? This is just unreadable.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
- rename and refactor draw_text_slice to draw_textn for more freely used
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch extracts the drawing logic from redr_raylib.c and moves it
into a new abstraction layer in view.c, introducing a tree-based view
system for UI rendering.
- view.c defines a hierarchical 'view' structure with polymorphic draw methods.
- root and ed_buf views are implemented as a proof of concept.
- redr.c (via redr.h) now exposes only backend rendering primitives (text, clear, measure).
- main.c is updated to instantiate and draw the view tree.
This separation clarifies the responsibilities between layout (view)
and rendering (redr) and prepares the system for future UI extensions
such as nested panels, split views, and overlays.
|
| | |
|
| |
|
|
|
|
|
|
| |
Also introduce obj_rule, wrapper for obj build script used on %.o and
%.test.o targets.
[minor]
use ?= instead of := for CC and CFLAGS.
|
| |
|
|
|
|
|
|
| |
- Skip unnecessary cwd resolution when realpath returns ENAMETOOLONG.
- Drop duplicate error-handling branches and route all failures
through bind_fail.
- Keep behavior unchanged while shaving a few lines and clarifying
the control flow.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This patch produces *.test.o, which is dedicated for unittest binary
which is compiled with -fsanitize=address flag.
|
| |
|
|
|
|
|
|
|
| |
- Derive `SRCS`, `OBJS`, and `DEPS` automatically via `wildcard`/pattern rules
- Switch to `:=` for simple variable expansion; drop redundant TEST_* variables
- Use a single pattern rule (`%.o: %.c`) instead of hand-written per-file recipes
- Mark `all`, `clean`, and `test` as explicit `.PHONY` targets
- Extend `clean` to remove generated `.d` files
- Update **.gitignore** to ignore `*.d` alongside `vgcore.*`
|
| |
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
| |
[minor]
fix perror("func: ") to perror("func")
|
| |
|
|
|
|
|
|
|
| |
Cursor initialization is now assumed to be handled by eb_init,
eliminating redundant resets in eb_load_file and improving separation
of concerns.
[minor]
add comment to struct ed_buf
|
| |
|
|
| |
len is size_t variable
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
- fix log_printf to not automatically insert newline
|
| |
|
|
|
|
|
|
| |
- Replaced log_set_level() with log_init() to allow stream configuration.
- log_fprintf() now uses an internal stream, defaulting to stdout.
[minor]
update log tags in TODO.org correctly
|
| |
|
|
|
| |
- refactor enums in LOG_* to RED_LOG_* since its conflicting raylib
namespaces
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This patch removes the dependency on raylib when allocating memory.
|
| |
|
|
|
|
| |
The function eb_delete_line did not properly free the contents of the
entry when deleting an element from eb->line_vec. This patch fixes
that issue.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Previously, each character of a line was written using fputc in a
loop, resulting in millions of function calls for large lines and poor
write performance. Replaced with a single fwrite call per line,
significantly reducing overhead and improving save performance
dramatically.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This patch removes obsolated line_get_string on eb_save_file.
|