SF.net SVN: geany: [483] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Sun Jun 25 17:50:40 UTC 2006
Revision: 483
Author: eht16
Date: 2006-06-25 10:50:34 -0700 (Sun, 25 Jun 2006)
ViewCVS: http://svn.sourceforge.net/geany/?rev=483&view=rev
Log Message:
-----------
Fixed wrong line numbers for found tags.
Modified Paths:
--------------
trunk/ChangeLog
trunk/tagmanager/tm_tag.c
trunk/tagmanager/tm_workspace.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-06-25 17:02:27 UTC (rev 482)
+++ trunk/ChangeLog 2006-06-25 17:50:34 UTC (rev 483)
@@ -4,6 +4,8 @@
* src/callbacks.c, src/keybindings.c:
Remember the active page when toggling the sidebar. Simplified code
for toggling messages window.
+ * tagmanager/tm_tag.c, tagmanager/tm_workspace.c:
+ Fixed wrong line numbers for found tags.
2006-06-25 Nick Treleaven <nick.treleaven at btinternet.com>
Modified: trunk/tagmanager/tm_tag.c
===================================================================
--- trunk/tagmanager/tm_tag.c 2006-06-25 17:02:27 UTC (rev 482)
+++ trunk/tagmanager/tm_tag.c 2006-06-25 17:50:34 UTC (rev 483)
@@ -197,8 +197,7 @@
TAG_FREE(tag);
return NULL;
}
- // if I don't do the following, tag->atts.file.lang has an undefined value, which is quite bad
- tag->atts.file.lang = file->lang;
+
return tag;
}
Modified: trunk/tagmanager/tm_workspace.c
===================================================================
--- trunk/tagmanager/tm_workspace.c 2006-06-25 17:02:27 UTC (rev 482)
+++ trunk/tagmanager/tm_workspace.c 2006-06-25 17:50:34 UTC (rev 483)
@@ -446,6 +446,7 @@
static GPtrArray *tags = NULL;
TMTag **matches[2], **match;
int i, len, tagCount[2]={0,0}, tagIter;
+ gint tags_lang;
if ((!theWorkspace) || (!name))
return NULL;
@@ -464,9 +465,18 @@
match = matches[i];
if (match && *match)
{
+ // for global tags: tag->atts.file.lang contains the language and
+ // tags->atts.entry.file->lang is NULL
+ // for "usual" tags: tag->atts.file.lang contains the line of the tag and
+ // tags->atts.entry.file->lang contains the language
+ if ((*match)->atts.entry.file != NULL)
+ tags_lang = (*match)->atts.entry.file->lang;
+ else
+ tags_lang = (*match)->atts.file.lang;
+
for (tagIter=0;tagIter<tagCount[i];++tagIter)
{
- if ((type & (*match)->type) && (lang == -1 || (*match)->atts.file.lang == lang))
+ if ((type & (*match)->type) && (lang == -1 || tags_lang == lang))
g_ptr_array_add(tags, *match);
if (partial)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list