summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-12-15 14:44:32 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-12-15 14:44:32 -0500
commitfc494813730cafa2d5bdd4e4f7cfd1093ac2a7d1 (patch)
treef949c7f6bcdb11daa578f4e4c4f4d9a2c89cdf26 /main.c
parent6c2963f91b90f73da862ac9feac25cdcc1266869 (diff)
inserting lines
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.c b/main.c
index 6d9e046..9bc9b13 100644
--- a/main.c
+++ b/main.c
@@ -117,13 +117,15 @@ int main(void) {
buffer_cursor_move_down(&text_buffer);
break;
case SDLK_RETURN:
- //buffer_insert_text_at_cursor(buffer, U"\n", 1);
+ buffer_insert_char_at_cursor(&text_buffer, U'\n');
+ break;
+ case SDLK_TAB:
+ buffer_insert_char_at_cursor(&text_buffer, U'\t');
break;
}
} break;
case SDL_TEXTINPUT: {
char *text = event.text.text;
- printf("TEXT: %s\n",text);
buffer_insert_utf8_at_cursor(&text_buffer, text);
} break;
}