SF.net SVN: geany:[3869] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Wed Jun 17 10:56:37 UTC 2009


Revision: 3869
          http://geany.svn.sourceforge.net/geany/?rev=3869&view=rev
Author:   ntrel
Date:     2009-06-17 10:56:37 +0000 (Wed, 17 Jun 2009)

Log Message:
-----------
Only autocomplete scope for scopes matching the current filetype's
language.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/editor.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-06-17 10:46:43 UTC (rev 3868)
+++ trunk/ChangeLog	2009-06-17 10:56:37 UTC (rev 3869)
@@ -3,6 +3,9 @@
  * src/filetypes.h, src/document.c, src/document.h, src/ui_utils.c:
    Make GeanyDocument::file_type always be non-NULL, even for a new
    document with no filetype set.
+ * src/editor.c:
+   Only autocomplete scope for scopes matching the current filetype's
+   language.
 
 
 2009-06-16  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>

Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c	2009-06-17 10:46:43 UTC (rev 3868)
+++ trunk/src/editor.c	2009-06-17 10:56:37 UTC (rev 3869)
@@ -490,9 +490,9 @@
 	gchar *name;
 	const GPtrArray *tags = NULL;
 	const TMTag *tag;
-	gint ft_id = FILETYPE_ID(editor->document->file_type);
+	GeanyFiletype *ft = editor->document->file_type;
 
-	if (ft_id == GEANY_FILETYPES_C || ft_id == GEANY_FILETYPES_CPP)
+	if (ft->id == GEANY_FILETYPES_C || ft->id == GEANY_FILETYPES_CPP)
 	{
 		if (match_last_chars(sci, pos, "->") || match_last_chars(sci, pos, "::"))
 			pos--;
@@ -509,7 +509,7 @@
 	if (!name)
 		return;
 
-	tags = tm_workspace_find(name, tm_tag_max_t, NULL, FALSE, -1);
+	tags = tm_workspace_find(name, tm_tag_max_t, NULL, FALSE, ft->lang);
 	g_free(name);
 	if (!tags || tags->len == 0)
 		return;


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