summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-03 18:01:04 -0500
committerpommicket <pommicket@gmail.com>2023-01-03 18:01:04 -0500
commitc0397f1f4c80e73a2e4ccd1946703fe6a5bb405e (patch)
tree5b95649c140083e2af4332bb92260842436f22c9 /command.c
parent87c8bd6eb27edb4bfc539967235c3a1e2f8d77e4 (diff)
go to type definition
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;