CE Quit editor
All checks were successful
Build documentation / build-and-deploy (push) Successful in 1m45s

This commit is contained in:
2026-03-05 18:20:40 +01:00
parent b91476f247
commit 6f392d0a32

View File

@@ -86,7 +86,9 @@ void edit_start (const char* text) {
mprintf (ANSIQ_SCR_SAVE ANSIQ_SCR_CLR_ALL ANSIQ_CUR_INVISIBLE);
for (;;) {
bool edit_run = true;
while (edit_run) {
update_horz_scroll (cols);
update_vert_scroll (rows);
@@ -201,6 +203,9 @@ void edit_start (const char* text) {
case KB_END:
editor.cursor.col = gapbuffer_length (&editor.current_line->gb);
break;
case KB_CTRL ('Q'):
edit_run = false;
break;
default:
if (isprint (ch)) {
gapbuffer_insert (&wrealloc, NULL, &editor.current_line->gb, ch);
@@ -212,7 +217,7 @@ void edit_start (const char* text) {
arena_reset (&temp_arena);
}
mprintf (ANSIQ_CUR_VISIBLE ANSIQ_SCR_RESTORE);
mprintf (ANSIQ_SCR_CLR_ALL ANSIQ_CUR_VISIBLE ANSIQ_SCR_RESTORE);
arena_destroy (&temp_arena);