Skip to content

Commit

Permalink
Remove invalid python-specific code
Browse files Browse the repository at this point in the history
The code in the comment maybe used to be true some time ago but now
no kind maps to namespace for Python.
  • Loading branch information
techee authored and eht16 committed Jan 9, 2022
1 parent 4980a03 commit 7340a87
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/symbols.c
Expand Up @@ -2511,11 +2511,7 @@ gint symbols_get_current_function(GeanyDocument *doc, const gchar **tagname)
gint symbols_get_current_scope(GeanyDocument *doc, const gchar **tagname)
{
TMTagType tag_types = (tm_tag_function_t | tm_tag_method_t | tm_tag_class_t |
tm_tag_struct_t | tm_tag_enum_t | tm_tag_union_t);

/* Python parser reports imports as namespaces which confuses the scope detection */
if (doc && doc->file_type->lang != filetypes[GEANY_FILETYPES_PYTHON]->lang)
tag_types |= tm_tag_namespace_t;
tm_tag_struct_t | tm_tag_enum_t | tm_tag_union_t | tm_tag_namespace_t);

return get_current_tag_name_cached(doc, tagname, tag_types);
}
Expand Down

0 comments on commit 7340a87

Please sign in to comment.