summaryrefslogtreecommitdiff
path: root/editor.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor.h')
-rw-r--r--editor.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/editor.h b/editor.h
index f38a7d4..0fe8bab 100644
--- a/editor.h
+++ b/editor.h
@@ -25,6 +25,12 @@ struct editor_state {
time_t status_message_time;
struct editor_syntax* syntax;
int mode;
+ /*
+ * Keep track of whether a key that toggles insert mode has been pressed, so
+ * we can ignore it during the text input event. Otherwise, an 'i' or other
+ * letter will be inserted when entering insert mode.
+ */
+ int pressed_insert_key;
};
void init_editor(struct editor_state* editor);