diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-26 15:42:34 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-26 15:42:34 -0500 |
commit | 65b6850a7dc3211566993f8a2cfacf61f5b4d6a2 (patch) | |
tree | 6fb8cc7417273db106d921224c990f78d8f3cdf4 /main.c | |
parent | 3050f7539aa780f15ea1ae4bd0296dfbb57b8e03 (diff) |
auto-indent
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 16 |
1 files changed, 1 insertions, 15 deletions
@@ -1,9 +1,8 @@ // @TODO: -// - save as // - warn on: // - overwrite (from save as menu) // - unsaved changes -// - auto-indent +// - tabs, split // - Windows installation #include "base.h" no_warn_start @@ -362,22 +361,9 @@ int main(int argc, char **argv) { (u32)((modifier & (KMOD_LALT|KMOD_RALT)) != 0) << KEY_MODIFIER_ALT_BIT; if (key_combo < KEY_COMBO_COUNT) { KeyAction *action = &ted->key_actions[key_combo]; - bool was_in_line_buffer = buffer && buffer->is_line_buffer; if (action->command) { command_execute(ted, action->command, action->argument); } - - if (buffer) { - switch (key_combo) { - case SDL_SCANCODE_RETURN << 3: - if (!was_in_line_buffer) // make sure return to submit line buffer doesn't get added to newly-active buffer - buffer_insert_char_at_cursor(buffer, '\n'); - break; - case SDL_SCANCODE_TAB << 3: - buffer_insert_char_at_cursor(buffer, '\t'); - break; - } - } } } break; case SDL_TEXTINPUT: { |