From ab00e1e288743496e75c5e54c0e6abdecf439642 Mon Sep 17 00:00:00 2001 From: cflip Date: Thu, 12 Jan 2023 10:37:09 -0700 Subject: Move cursor movement into separate functions --- editor.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'editor.h') diff --git a/editor.h b/editor.h index 8b42b7f..63f6c76 100644 --- a/editor.h +++ b/editor.h @@ -23,9 +23,13 @@ struct editor_state { void init_editor(struct editor_state* editor); void editor_set_status_message(struct editor_state* editor, const char* format, ...); -void editor_refresh_screen(struct editor_state* editor); char* editor_prompt(struct editor_state* editor, char* prompt, void (*callback)(struct editor_state*, char*, int)); +void editor_move_left(struct editor_state *); +void editor_move_right(struct editor_state *); +void editor_move_up(struct editor_state *); +void editor_move_down(struct editor_state *); + void editor_insert_char(struct editor_state* editor, int c); void editor_insert_newline(struct editor_state* editor); void editor_delete_char(struct editor_state* editor); -- cgit v1.2.3