summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-02-22 12:36:50 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-02-22 12:36:50 -0500
commit1631f38d4dba64577c8f064225599273148ad83d (patch)
tree740747615e12e0d45681875cdb2e2d4f9f681e77 /command.c
parent37ce64c167e12c0d652442b2ff3deb9327d1317d (diff)
go to definition menu
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;
}
}