summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'command.c')
-rw-r--r--command.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/command.c b/command.c
index bf26b3a..9ba6766 100644
--- a/command.c
+++ b/command.c
@@ -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;