summaryrefslogtreecommitdiff
path: root/editor.h
diff options
context:
space:
mode:
authorcflip <cflip@cflip.net>2023-01-12 10:37:09 -0700
committercflip <cflip@cflip.net>2023-01-12 10:37:09 -0700
commitab00e1e288743496e75c5e54c0e6abdecf439642 (patch)
treedb06dd60a6567524b44d7c7fe901142d745854e2 /editor.h
parent54d0e32bced43dc3d85b41e30bcb1fa430ae90dc (diff)
Move cursor movement into separate functions
Diffstat (limited to 'editor.h')
-rw-r--r--editor.h6
1 files changed, 5 insertions, 1 deletions
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);