diff options
author | pommicket <pommicket@gmail.com> | 2023-01-03 18:01:04 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-01-03 18:01:04 -0500 |
commit | c0397f1f4c80e73a2e4ccd1946703fe6a5bb405e (patch) | |
tree | 5b95649c140083e2af4332bb92260842436f22c9 /command.c | |
parent | 87c8bd6eb27edb4bfc539967235c3a1e2f8d77e4 (diff) |
go to type definition
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -67,6 +67,7 @@ static CommandName const command_names[] = { {"goto-definition", CMD_GOTO_DEFINITION}, {"goto-definition-at-cursor", CMD_GOTO_DEFINITION_AT_CURSOR}, {"goto-declaration-at-cursor", CMD_GOTO_DECLARATION_AT_CURSOR}, + {"goto-type-definition-at-cursor", CMD_GOTO_TYPE_DEFINITION_AT_CURSOR}, {"find", CMD_FIND}, {"find-replace", CMD_FIND_REPLACE}, {"tab-close", CMD_TAB_CLOSE}, @@ -417,6 +418,11 @@ void command_execute(Ted *ted, Command c, i64 argument) { buffer_goto_word_at_cursor(buffer, GOTO_DECLARATION); } } break; + case CMD_GOTO_TYPE_DEFINITION_AT_CURSOR: { + if (buffer && buffer_is_named_file(buffer)) { + buffer_goto_word_at_cursor(buffer, GOTO_TYPE_DEFINITION); + } + } break; case CMD_FIND_USAGES: usages_find(ted); break; |