diff options
author | pommicket <pommicket@gmail.com> | 2023-01-07 22:32:59 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-01-07 22:32:59 -0500 |
commit | 01d5fcc72f6ea29d0f90b845b7565137e7daac14 (patch) | |
tree | 39346ae60c418345612ad6c6634943cc630d713d /ide-definitions.c | |
parent | cb55279a20865fcfde23a160233155d23a09a03b (diff) |
fix tags go-to-definition menu, silence errors for LSP not found
Diffstat (limited to 'ide-definitions.c')
-rw-r--r-- | ide-definitions.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ide-definitions.c b/ide-definitions.c index 673fe63..e956f5b 100644 --- a/ide-definitions.c +++ b/ide-definitions.c @@ -286,8 +286,7 @@ void definitions_selector_update(Ted *ted) { char *chosen = selector_update(ted, sel); if (chosen) { - free(chosen), chosen = NULL; - // we ignore `chosen` and use the cursor instead. + // for LSP go-to-definition, we ignore `chosen` and use the cursor instead. // this is because a single symbol can have multiple definitions, // e.g. with overloading. if (sel->cursor >= sel->n_entries) { @@ -311,6 +310,7 @@ void definitions_selector_update(Ted *ted) { menu_close(ted); tag_goto(ted, chosen); } + free(chosen); } } |