summaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-03-03 20:34:16 -0500
committerpommicket <pommicket@gmail.com>2023-03-03 20:35:44 -0500
commit1b383e6884d12d4098c4b6631e9c3e10cba0ffaf (patch)
treebfd88b9ffd8514b44f49e52d71cffd02e5d5c897 /buffer.c
parent2bd3bf463ec253ef7c12187b3beafc22599e41be (diff)
configurable hover/highlight key + better key stuff
scancodes are no longer used for anything
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/buffer.c b/buffer.c
index bb7fabf..12295e7 100644
--- a/buffer.c
+++ b/buffer.c
@@ -2612,7 +2612,7 @@ bool buffer_handle_click(Ted *ted, TextBuffer *buffer, vec2 click, u8 times) {
ted_switch_to_buffer(ted, buffer);
}
if (buffer == ted->active_buffer) {
- switch (ted->key_modifier) {
+ switch (ted_get_key_modifier(ted)) {
case KEY_MODIFIER_SHIFT:
// select to position
buffer_select_to_pos(buffer, buffer_pos);
@@ -2624,9 +2624,9 @@ bool buffer_handle_click(Ted *ted, TextBuffer *buffer, vec2 click, u8 times) {
// go to definition/declaration
buffer_cursor_move_to_pos(buffer, buffer_pos);
GotoType type = GOTO_DEFINITION;
- if (ted->key_modifier & KEY_MODIFIER_SHIFT)
+ if (ted_is_shift_down(ted))
type = GOTO_DECLARATION;
- else if (ted->key_modifier & KEY_MODIFIER_ALT)
+ else if (ted_is_alt_down(ted))
type = GOTO_TYPE_DEFINITION;
buffer_goto_word_at_cursor(buffer, type);
}