From 1b8261071ef3ad3b8d1c2db6e712b0e590c563b3 Mon Sep 17 00:00:00 2001 From: cflip Date: Tue, 31 Jan 2023 13:31:21 -0700 Subject: Reimplement editor_prompt and 'Save as' using the new prompt mode Now there there is a new way to prompt for text, we can reimplement the long abandoned editor_prompt function and use it to allow saving to new files. The new editor_prompt function takes a callback that will be called after the user presses enter on the prompt. --- input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'input.c') diff --git a/input.c b/input.c index c695cb9..2f93ce7 100644 --- a/input.c +++ b/input.c @@ -56,7 +56,7 @@ void editor_process_keypress(struct editor_state *editor, SDL_Keysym *keysym) break; case SDLK_s: if (keysym->mod & KMOD_CTRL) { - editor_save(editor); + editor_try_save(editor); break; } editor_move_down(editor); -- cgit v1.2.3