diff options
author | cflip <cflip@cflip.net> | 2023-01-12 12:35:49 -0700 |
---|---|---|
committer | cflip <cflip@cflip.net> | 2023-01-12 12:35:49 -0700 |
commit | b9558f6a53213089372e0aa9795745332cd6209d (patch) | |
tree | b1e18ae6f01642133734fcc9fcf5c2015caed31a | |
parent | 2021a3c4c0cd13d3a4f5ac097badb2eaedea1013 (diff) |
Manually insert tab characters
Tabs don't show up in the text input event for whatever reason so they
need to be manually inserted.
-rw-r--r-- | input.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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; |