diff options
author | pommicket <pommicket@gmail.com> | 2023-08-05 15:01:38 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-08-05 15:01:38 -0400 |
commit | b65943698a241624973f3ab54530bb5d5884cff2 (patch) | |
tree | 07b519ae1a9f601894935ddfba2f968656302dd8 /main.c | |
parent | 0f38b14e10f553cb49a5da65125e21e1591cba3e (diff) |
internalize Autocomplete
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -500,6 +500,7 @@ int main(int argc, char **argv) { gl_geometry_init(); text_init(); + autocomplete_init(ted); PROFILE_TIME(gl_end) @@ -633,8 +634,7 @@ int main(int argc, char **argv) { } else if (key_modifier == 0) { // scroll with mouse wheel Sint32 dx = event.wheel.x, dy = -event.wheel.y; - Autocomplete *ac = &ted->autocomplete; - if (ac->open && rect_contains_point(ac->rect, ted->mouse_pos)) { + if (autocomplete_box_contains_point(ted, ted->mouse_pos)) { autocomplete_scroll(ted, dy); } else { ted->scroll_total_x += dx; |