diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-28 16:22:49 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-28 16:22:49 -0500 |
commit | 238f3ecc526600d5c18fead7820469719027b07c (patch) | |
tree | d84cd6606be4a81e32f8f0634aeb924b0457e5f8 /command.c | |
parent | 5b90057859cd38b284573460460ab27bd108aa0e (diff) |
got file selector to behave better
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -101,7 +101,8 @@ void command_execute(Ted *ted, Command c, i64 argument) { buffer_insert_char_at_cursor(buffer, '\t'); break; case CMD_NEWLINE: - if (buffer->is_line_buffer) { + if (!buffer) { + } else if (buffer->is_line_buffer) { switch (ted->menu) { case MENU_NONE: assert(0); @@ -192,9 +193,4 @@ void command_execute(Ted *ted, Command c, i64 argument) { } break; } - - if (buffer && buffer_haserr(buffer)) { - ted_seterr_to_buferr(ted, buffer); - buffer_clearerr(buffer); - } } |