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 /buffer.c | |
parent | 87c8bd6eb27edb4bfc539967235c3a1e2f8d77e4 (diff) |
go to type definition
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2561,14 +2561,17 @@ bool buffer_handle_click(Ted *ted, TextBuffer *buffer, vec2 click, u8 times) { // select to position buffer_select_to_pos(buffer, buffer_pos); break; - case KEY_MODIFIER_CTRL: + case KEY_MODIFIER_CTRL: case KEY_MODIFIER_CTRL | KEY_MODIFIER_SHIFT: + case KEY_MODIFIER_CTRL | KEY_MODIFIER_ALT: if (!buffer->is_line_buffer) { // go to definition/declaration buffer_cursor_move_to_pos(buffer, buffer_pos); GotoType type = GOTO_DEFINITION; if (ted->key_modifier & KEY_MODIFIER_SHIFT) type = GOTO_DECLARATION; + else if (ted->key_modifier & KEY_MODIFIER_ALT) + type = GOTO_TYPE_DEFINITION; buffer_goto_word_at_cursor(buffer, type); } break; |