Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Sun, 03 Nov 2024 16:54:00 UTC Commit: fd70da00d9ae846b63d533f6d7d63dc3d96e0a5c https://github.com/geany/geany/commit/fd70da00d9ae846b63d533f6d7d63dc3d96e0a...
Log Message: ----------- Fix current_scope value passed to tm_workspace_is_autocomplete_tag()
When the parser doesn't provide scope, symbols_get_current_function() returns "unknown" in its tagname argument. We have to set it to NULL in this case so tm_workspace_is_autocomplete_tag() works correctly.
Modified Paths: -------------- src/symbols.c
Modified: src/symbols.c 3 lines changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -1599,7 +1599,8 @@ static GPtrArray *filter_tags(GPtrArray *tags, TMTag *current_tag, gboolean defi GPtrArray *filtered_tags = g_ptr_array_new(); guint i;
- symbols_get_current_function(doc, ¤t_scope); + if (symbols_get_current_function(doc, ¤t_scope) == -1) + current_scope = NULL; /* current_scope == "unknown" when not found */
foreach_ptr_array(tmtag, i, tags) {
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).