summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-02-09 14:38:59 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-02-09 14:38:59 -0500
commit0135ebfa879af50f19ddc1495a36be3c030a6326 (patch)
tree080d209c633adc52560839ef2381b4fd1959a752 /command.c
parent7be42dc83ff694da2f1e66a59a14fe51d3e18fba (diff)
find + replace seems to be working
Diffstat (limited to 'command.c')
-rw-r--r--command.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/command.c b/command.c
index 593779d..19c291e 100644
--- a/command.c
+++ b/command.c
@@ -107,7 +107,7 @@ void command_execute(Ted *ted, Command c, i64 argument) {
switch (ted->menu) {
case MENU_NONE:
if (ted->find) {
- if (buffer == &ted->find_buffer) {
+ if (buffer == &ted->find_buffer || buffer == &ted->replace_buffer) {
if (c == CMD_NEWLINE)
find_next(ted);
else
@@ -262,7 +262,10 @@ void command_execute(Ted *ted, Command c, i64 argument) {
break;
case CMD_FIND:
- find_open(ted);
+ find_open(ted, false);
+ break;
+ case CMD_FIND_REPLACE:
+ find_open(ted, true);
break;
case CMD_ESCAPE: