Fixed bug which prevented tag creation for the first opened file.
Removed unused code. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@491 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
590974e3ba
commit
f741c89b4f
@ -5,6 +5,9 @@
|
||||
* src/treeviews.c: Changed some titles to plural. Added own
|
||||
definitions for filetype Python.
|
||||
* src/filetypes.c, tagmanager/make.c: Add mk pattern for Makefile.
|
||||
* tagmanager/tm_source_file.c: Fixed bug which prevented tag creation
|
||||
for the first opened file.
|
||||
* src/document.c, src/callbacks.c: Removed unused code.
|
||||
|
||||
|
||||
2006-06-26 Nick Treleaven <nick.treleaven@btinternet.com>
|
||||
|
@ -1140,9 +1140,6 @@ on_filetype_change (GtkMenuItem *menuitem,
|
||||
if (idx < 0) return;
|
||||
|
||||
document_set_filetype(idx, (filetype*)user_data);
|
||||
|
||||
//sci_colourise(doc_list[idx].sci, 0, -1);
|
||||
//document_update_tag_list(idx);
|
||||
}
|
||||
|
||||
|
||||
|
@ -915,19 +915,13 @@ void document_update_tag_list(gint idx, gboolean update)
|
||||
}
|
||||
else
|
||||
{
|
||||
gint len = sci_get_length(doc_list[idx].sci) + 1;
|
||||
gchar *buf = (gchar*) g_malloc(len);
|
||||
|
||||
sci_get_text(doc_list[idx].sci, len, buf);
|
||||
|
||||
if (tm_source_file_update(doc_list[idx].tm_file, TRUE, FALSE, TRUE))
|
||||
//if (tm_source_file_buffer_update(doc_list[idx].tm_file, buf, len, TRUE))
|
||||
{
|
||||
utils_update_tag_list(idx, TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
geany_debug(_("tag list updating failed"));
|
||||
geany_debug("tag list updating failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,10 +39,7 @@ gboolean tm_source_file_init(TMSourceFile *source_file, const char *file_name
|
||||
if (FALSE == tm_work_object_init(&(source_file->work_object),
|
||||
source_file_class_id, file_name, FALSE))
|
||||
return FALSE;
|
||||
if (name == NULL)
|
||||
source_file->lang = LANG_AUTO;
|
||||
else
|
||||
source_file->lang = getNamedLanguage(name);
|
||||
|
||||
source_file->inactive = FALSE;
|
||||
if (NULL == LanguageTable)
|
||||
{
|
||||
@ -52,6 +49,11 @@ gboolean tm_source_file_init(TMSourceFile *source_file, const char *file_name
|
||||
TagEntryFunction = tm_source_file_tags;
|
||||
}
|
||||
|
||||
if (name == NULL)
|
||||
source_file->lang = LANG_AUTO;
|
||||
else
|
||||
source_file->lang = getNamedLanguage(name);
|
||||
|
||||
if (update)
|
||||
tm_source_file_update(TM_WORK_OBJECT(source_file), FALSE, FALSE, FALSE);
|
||||
return TRUE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user