Kaydet (Commit) d8c3ecaf authored tarafından Nick Treleaven's avatar Nick Treleaven

Ensure empty symbol list is shown when tags cannot be parsed (fixes

wrong symbol list shown when creating a new document with an unsaved
filename set).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1998 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 6ca340f0
......@@ -1724,6 +1724,8 @@ void document_set_font(gint idx, const gchar *font_name, gint size)
void document_update_tag_list(gint idx, gboolean update)
{
gboolean success = FALSE;
// if the filetype doesn't have a tag parser or it is a new file
if (idx == -1 || doc_list[idx].file_type == NULL ||
! filetype_has_tags(doc_list[idx].file_type) || ! doc_list[idx].file_name)
......@@ -1744,23 +1746,26 @@ void document_update_tag_list(gint idx, gboolean update)
locale_filename, FALSE, doc_list[idx].file_type->name);
g_free(locale_filename);
#endif
if (! doc_list[idx].tm_file) return;
tm_workspace_add_object(doc_list[idx].tm_file);
if (update)
tm_source_file_update(doc_list[idx].tm_file, TRUE, FALSE, TRUE);
treeviews_update_tag_list(idx, TRUE);
if (doc_list[idx].tm_file)
{
tm_workspace_add_object(doc_list[idx].tm_file);
if (update)
tm_source_file_update(doc_list[idx].tm_file, TRUE, FALSE, TRUE);
success = TRUE;
}
}
else
{
if (tm_source_file_update(doc_list[idx].tm_file, TRUE, FALSE, TRUE))
{
treeviews_update_tag_list(idx, TRUE);
success = TRUE;
}
else
{
geany_debug("tag list updating failed");
}
}
treeviews_update_tag_list(idx, success);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment