diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-08 14:50:30 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-08 14:50:30 -0500 |
commit | f05a22635e54564e9dfed28f83ea583a19046d03 (patch) | |
tree | 519861992a7c313b7d9ebf5b273b2bd436f6fd96 /command.c | |
parent | aa862462008e647cc4e87fd4618fe5dc5af1076d (diff) |
search in both directions
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -101,13 +101,17 @@ void command_execute(Ted *ted, Command c, i64 argument) { buffer_insert_char_at_cursor(buffer, '\t'); break; case CMD_NEWLINE: + case CMD_NEWLINE_BACK: if (!buffer) { } else if (buffer->is_line_buffer) { switch (ted->menu) { case MENU_NONE: if (ted->find) { if (buffer == &ted->find_buffer) { - find_next(ted); + if (c == CMD_NEWLINE) + find_next(ted); + else + find_prev(ted); } } break; |