summaryrefslogtreecommitdiff
path: root/editor.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor.h')
-rw-r--r--editor.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/editor.h b/editor.h
index 63f6c76..7df152a 100644
--- a/editor.h
+++ b/editor.h
@@ -4,6 +4,12 @@
#include <time.h>
#include "buffer.h"
+enum editor_mode {
+ EDITOR_MODE_NORMAL,
+ EDITOR_MODE_INSERT,
+ EDITOR_MODE_COMMAND
+};
+
struct editor_state {
int cursor_x, cursor_y;
int cursor_display_x;
@@ -18,6 +24,7 @@ struct editor_state {
char status_message[80];
time_t status_message_time;
struct editor_syntax* syntax;
+ int mode;
};
void init_editor(struct editor_state* editor);