summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-02-08 14:50:30 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-02-08 14:50:30 -0500
commitf05a22635e54564e9dfed28f83ea583a19046d03 (patch)
tree519861992a7c313b7d9ebf5b273b2bd436f6fd96 /command.c
parentaa862462008e647cc4e87fd4618fe5dc5af1076d (diff)
search in both directions
Diffstat (limited to 'command.c')
-rw-r--r--command.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/command.c b/command.c
index 0dd2b34..593779d 100644
--- a/command.c
+++ b/command.c
@@ -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;