SF.net SVN: geany:[3830] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Mon Jun 1 15:21:55 UTC 2009


Revision: 3830
          http://geany.svn.sourceforge.net/geany/?rev=3830&view=rev
Author:   ntrel
Date:     2009-06-01 15:21:55 +0000 (Mon, 01 Jun 2009)

Log Message:
-----------
Fix grouping symbol list children when parent name has "." character
in for reStructuredText and Conf filetypes (and any in the Misc
group).

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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-06-01 14:37:53 UTC (rev 3829)
+++ trunk/ChangeLog	2009-06-01 15:21:55 UTC (rev 3830)
@@ -4,6 +4,10 @@
    Support named styles also for filetypes.common [styling] entries.
  * doc/geany.txt, doc/geany.html, HACKING:
    Update docs for named styles in filetypes.* files.
+ * src/symbols.c:
+   Fix grouping symbol list children when parent name has "." character
+   in for reStructuredText and Conf filetypes (and any in the Misc
+   group).
 
 
 2009-05-30  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>

Modified: trunk/src/symbols.c
===================================================================
--- trunk/src/symbols.c	2009-06-01 14:37:53 UTC (rev 3829)
+++ trunk/src/symbols.c	2009-06-01 15:21:55 UTC (rev 3830)
@@ -268,29 +268,28 @@
 
 const gchar *symbols_get_context_separator(gint ft_id)
 {
-	gchar *cosep;
+	GeanyFiletype *ft = filetypes[ft_id];
 
+	switch (ft->group)
+	{
+		/* avoid confusion with other possible separators in section name for e.g. reST, Conf */
+		case GEANY_FILETYPE_GROUP_MISC:
+			return ":::";
+		default:
+			break;
+	}
+
 	switch (ft_id)
 	{
 		case GEANY_FILETYPES_C:	/* for C++ .h headers or C structs */
 		case GEANY_FILETYPES_CPP:
 		case GEANY_FILETYPES_GLSL:	/* for structs */
 		/*case GEANY_FILETYPES_RUBY:*/ /* not sure what to use atm*/
-		{
-			static gchar cc[] = "::";
+			return "::";
 
-			cosep = cc;
-		}
-		break;
-
 		default:
-		{
-			static gchar def[] = ".";
-
-			cosep = def;
-		}
+			return ".";
 	}
-	return cosep;	/* return ptr to static string */
 }
 
 


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