summaryrefslogtreecommitdiff
path: root/ide-highlights.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 /ide-highlights.c
parent2bd3bf463ec253ef7c12187b3beafc22599e41be (diff)
configurable hover/highlight key + better key stuff
scancodes are no longer used for anything
Diffstat (limited to 'ide-highlights.c')
-rw-r--r--ide-highlights.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ide-highlights.c b/ide-highlights.c
index 4188f4e..8c58657 100644
--- a/ide-highlights.c
+++ b/ide-highlights.c
@@ -52,9 +52,9 @@ void highlights_frame(Ted *ted) {
return;
}
const Settings *settings = buffer_settings(buffer);
- bool f2_down = SDL_GetKeyboardState(NULL)[SDL_SCANCODE_F2];
+ bool key_down = ted_is_key_combo_down(ted, settings->highlight_key);
if (!settings->highlight_enabled
- || (!settings->highlight_auto && !f2_down)) {
+ || (!settings->highlight_auto && !key_down)) {
highlights_close(ted);
return;
}