diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-21 16:14:10 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-21 16:14:10 -0500 |
commit | 37ce64c167e12c0d652442b2ff3deb9327d1317d (patch) | |
tree | 8d6ef23080e635955529ef3a851d7d33a53230be /command.c | |
parent | 617907fb4731d67f6e7aca17b9dd7881f2093aad (diff) |
generalized selector code seems to work, fix buffer_set_line_len memory leak
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -118,16 +118,12 @@ void command_execute(Ted *ted, Command c, i64 argument) { break; case CMD_NEWLINE: case CMD_NEWLINE_BACK: - if (!buffer) { - } else if (buffer->is_line_buffer) { - ted->line_buffer_submitted = true; - if (ted->find) { - if (buffer == &ted->find_buffer || buffer == &ted->replace_buffer) { - if (c == CMD_NEWLINE) - find_next(ted); - else - find_prev(ted); - } + if (ted->find) { + if (buffer == &ted->find_buffer || buffer == &ted->replace_buffer) { + if (c == CMD_NEWLINE) + find_next(ted); + else + find_prev(ted); } } else { buffer_newline(buffer); |