diff options
author | pommicket <pommicket@gmail.com> | 2023-09-07 15:18:45 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-09-07 22:49:53 -0400 |
commit | 5cad1bee9b72610d9d97b5f97e7f1a245a2d2ba5 (patch) | |
tree | 5ee6f155f6900be4eeec07ad33417d2d9992a80f /ide-autocomplete.c | |
parent | 815d652b570f53c989f62d0c7db847d7d6dfd940 (diff) |
more diagnostics
Diffstat (limited to 'ide-autocomplete.c')
-rw-r--r-- | ide-autocomplete.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ide-autocomplete.c b/ide-autocomplete.c index 6f67506..295dcda 100644 --- a/ide-autocomplete.c +++ b/ide-autocomplete.c @@ -616,7 +616,7 @@ void autocomplete_frame(Ted *ted) { ac->rect = menu_rect; } - i32 mouse_entry = scroll + (i32)((ted->mouse_pos.y - start_y) / char_height); + i32 mouse_entry = scroll + (i32)((ted_mouse_pos(ted).y - start_y) / char_height); Autocompletion *document = NULL; if (ncompletions) { @@ -629,7 +629,7 @@ void autocomplete_frame(Ted *ted) { } } if (mouse_entry >= 0 && mouse_entry < (i32)ncompletions - && rect_contains_point(ac->rect, ted->mouse_pos)) { + && ted_mouse_in_rect(ted, ac->rect)) { // highlight moused over entry Rect r = rect_xywh(x, start_y + (float)(mouse_entry - scroll) * char_height, menu_width, char_height); gl_geometry_rect(r, colors[COLOR_AUTOCOMPLETE_HL]); |