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. --- file.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'file.h') diff --git a/file.h b/file.h index 70889ac..d0ba218 100644 --- a/file.h +++ b/file.h @@ -4,6 +4,6 @@ #include "editor.h" void editor_open(struct editor_state* editor, char* filename); -void editor_save(struct editor_state* editor); +int file_save_current_file(struct editor_state *editor); #endif -- cgit v1.2.3