diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-22 12:36:50 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-22 12:36:50 -0500 |
commit | 1631f38d4dba64577c8f064225599273148ad83d (patch) | |
tree | 740747615e12e0d45681875cdb2e2d4f9f681e77 /command.c | |
parent | 37ce64c167e12c0d652442b2ff3deb9327d1317d (diff) |
go to definition menu
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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; } } |