summaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorcflip <cflip@cflip.net>2023-01-31 13:31:21 -0700
committercflip <cflip@cflip.net>2023-01-31 14:00:17 -0700
commit1b8261071ef3ad3b8d1c2db6e712b0e590c563b3 (patch)
treeca7e8528b37ccd1d7748b5c70582239b506f8b6a /input.c
parent264c4186ed8e3d2e3275a6514c8714903036cb26 (diff)
Reimplement editor_prompt and 'Save as' using the new prompt modeHEADmaster
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.
Diffstat (limited to 'input.c')
-rw-r--r--input.c2
1 files changed, 1 insertions, 1 deletions
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);