summaryrefslogtreecommitdiff
path: root/ui.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-04 12:47:59 -0500
committerpommicket <pommicket@gmail.com>2023-01-04 12:47:59 -0500
commit4736d2d6c02b2715bba58484eacce51495df2f4c (patch)
tree5ab45e40facbd507ad9cb5d638d522229ae7ac8b /ui.c
parent3756a3e47221c3b0133724a482341a9010076a9e (diff)
fix mouse clicks in the "go to definition" menu
Diffstat (limited to 'ui.c')
-rw-r--r--ui.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui.c b/ui.c
index ad1fe56..0a68d03 100644
--- a/ui.c
+++ b/ui.c
@@ -82,6 +82,7 @@ char *selector_update(Ted *ted, Selector *s) {
for (uint c = 0; c < ted->nmouse_clicks[SDL_BUTTON_LEFT]; ++c) {
if (rect_contains_point(entry_rect, ted->mouse_clicks[SDL_BUTTON_LEFT][c])) {
// this option was selected
+ s->cursor = i; // indicate the index of the selected entry using s->cursor
ret = str_dup(s->entries[i].name);
break;
}