diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-12-15 14:44:32 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-12-15 14:44:32 -0500 |
commit | fc494813730cafa2d5bdd4e4f7cfd1093ac2a7d1 (patch) | |
tree | f949c7f6bcdb11daa578f4e4c4f4d9a2c89cdf26 /main.c | |
parent | 6c2963f91b90f73da862ac9feac25cdcc1266869 (diff) |
inserting lines
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; } |