CE Quit editor
All checks were successful
Build documentation / build-and-deploy (push) Successful in 1m45s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 1m45s
This commit is contained in:
@@ -86,7 +86,9 @@ void edit_start (const char* text) {
|
|||||||
|
|
||||||
mprintf (ANSIQ_SCR_SAVE ANSIQ_SCR_CLR_ALL ANSIQ_CUR_INVISIBLE);
|
mprintf (ANSIQ_SCR_SAVE ANSIQ_SCR_CLR_ALL ANSIQ_CUR_INVISIBLE);
|
||||||
|
|
||||||
for (;;) {
|
bool edit_run = true;
|
||||||
|
|
||||||
|
while (edit_run) {
|
||||||
update_horz_scroll (cols);
|
update_horz_scroll (cols);
|
||||||
update_vert_scroll (rows);
|
update_vert_scroll (rows);
|
||||||
|
|
||||||
@@ -201,6 +203,9 @@ void edit_start (const char* text) {
|
|||||||
case KB_END:
|
case KB_END:
|
||||||
editor.cursor.col = gapbuffer_length (&editor.current_line->gb);
|
editor.cursor.col = gapbuffer_length (&editor.current_line->gb);
|
||||||
break;
|
break;
|
||||||
|
case KB_CTRL ('Q'):
|
||||||
|
edit_run = false;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
if (isprint (ch)) {
|
if (isprint (ch)) {
|
||||||
gapbuffer_insert (&wrealloc, NULL, &editor.current_line->gb, ch);
|
gapbuffer_insert (&wrealloc, NULL, &editor.current_line->gb, ch);
|
||||||
@@ -212,7 +217,7 @@ void edit_start (const char* text) {
|
|||||||
arena_reset (&temp_arena);
|
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);
|
arena_destroy (&temp_arena);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user