summaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'input.c')
-rw-r--r--input.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/input.c b/input.c
index 7a18441..8a9d673 100644
--- a/input.c
+++ b/input.c
@@ -15,6 +15,9 @@ void editor_process_keypress(struct editor_state *editor, SDL_Keysym *keysym)
if (keysym->sym == SDLK_RETURN)
editor_insert_newline(editor);
+ if (keysym->sym == SDLK_TAB)
+ editor_insert_char(editor, '\t');
+
if (keysym->sym == SDLK_ESCAPE)
editor->mode = EDITOR_MODE_NORMAL;
return;