CE optimize KB_DELETE
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m6s

This commit is contained in:
2026-03-08 12:22:59 +01:00
parent 0de0b4c1ae
commit a8d21b2d67
3 changed files with 24 additions and 10 deletions

View File

@@ -283,10 +283,7 @@ void edit_start (const char* file_path, const char* text) {
struct edit_line* next_line = list_entry (next, struct edit_line, lines_link);
size_t next_len = gapbuffer_length (&next_line->gb);
for (size_t i = 0; i < next_len; i++) {
char chr = gapbuffer_at (&next_line->gb, i);
gapbuffer_insert (&wrealloc, NULL, &editor.current_line->gb, chr);
}
gapbuffer_concat (&wrealloc, NULL, &editor.current_line->gb, &next_line->gb);
list_remove (editor.lines, &next_line->lines_link);
free (next_line->gb.buffer);