diff options
author | pommicket <pommicket@gmail.com> | 2022-12-20 21:54:52 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-12-20 21:54:52 -0500 |
commit | 7568add9317f2bad5f633e5c587c76b87175899f (patch) | |
tree | f758573c4f3fdd6ecb7ebde4fb17314b51ad3b2f /buffer.c | |
parent | 885df8890e537383df71f8f828444d6c5cce0243 (diff) |
autocomplete very broken but kinda working
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2343,8 +2343,8 @@ u32 buffer_last_rendered_line(TextBuffer *buffer) { // returns true if the buffer "used" this event bool buffer_handle_click(Ted *ted, TextBuffer *buffer, v2 click, u8 times) { BufferPos buffer_pos; - if (ted->autocomplete) { - if (rect_contains_point(ted->autocomplete_rect, click)) + if (ted->autocomplete.open) { + if (rect_contains_point(ted->autocomplete.rect, click)) return false; // don't look at clicks in the autocomplete menu else autocomplete_close(ted); // close autocomplete menu if user clicks outside of it |