summaryrefslogtreecommitdiff
path: root/ide-hover.c
diff options
context:
space:
mode:
Diffstat (limited to 'ide-hover.c')
-rw-r--r--ide-hover.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/ide-hover.c b/ide-hover.c
index 9a7c0c9..1d6ccbc 100644
--- a/ide-hover.c
+++ b/ide-hover.c
@@ -79,13 +79,16 @@ void hover_frame(Ted *ted, double dt) {
bool shift_down = SDL_GetKeyboardState(NULL)[SDL_SCANCODE_LSHIFT]
|| SDL_GetKeyboardState(NULL)[SDL_SCANCODE_RSHIFT];
- if (!shift_down) {
+ bool open_hover = shift_down || hover->time >= settings->hover_time;
+
+ hover->time += dt;
+
+ if (!open_hover)
hover_close(ted);
- }
(void)dt;
if (!hover->open) {
- if (shift_down) {
+ if (open_hover) {
hover_send_request(ted);
hover->open = true;
}