summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'command.c')
-rw-r--r--command.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/command.c b/command.c
index 78d5b24..4488289 100644
--- a/command.c
+++ b/command.c
@@ -125,7 +125,7 @@ void command_execute(Ted *ted, Command c, i64 argument) {
else
find_prev(ted);
}
- } else {
+ } else if (buffer) {
buffer_newline(buffer);
}
break;
@@ -269,10 +269,12 @@ void command_execute(Ted *ted, Command c, i64 argument) {
break;
case CMD_FIND:
- find_open(ted, false);
+ if (buffer)
+ find_open(ted, false);
break;
case CMD_FIND_REPLACE:
- find_open(ted, true);
+ if (buffer)
+ find_open(ted, true);
break;
case CMD_ESCAPE:
@@ -299,5 +301,8 @@ void command_execute(Ted *ted, Command c, i64 argument) {
case CMD_BUILD_PREV_ERROR:
build_prev_error(ted);
break;
+ case CMD_OPEN_DEFINITION_MENU:
+ menu_open(ted, MENU_GOTO_DEFINITION);
+ break;
}
}