[geany/geany] c2d2fd: Return a non-printing sequence for no context separators

elextr git-noreply at xxxxx
Wed May 15 04:10:22 UTC 2013


Branch:      refs/heads/master
Author:      elextr <elextr at gmail.com>
Committer:   elextr <elextr at gmail.com>
Date:        Wed, 15 May 2013 04:10:22 UTC
Commit:      c2d2fddca3854efd7ab6711a25f451a2b5cc596d
             https://github.com/geany/geany/commit/c2d2fddca3854efd7ab6711a25f451a2b5cc596d

Log Message:
-----------
Return a non-printing sequence for no context separators

Function symbols_get_context_separator() returns the symbol
separator for the language, but some languages do not have
symbol context separators, for example markup languages like
Asciidoc.  To prevent the symbols pane wrongly detecting and
acting on a valid character sequence as a separator, return a
non-printing character which should not occur.

Options "" and NULL not used as they break some code and would
need an ABI bump.

Other languages can be added as they are identified.


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

Modified: src/symbols.c
7 files changed, 7 insertions(+), 0 deletions(-)
===================================================================
@@ -285,6 +285,9 @@ GString *symbols_find_tags_as_string(GPtrArray *tags_array, guint tag_types, gin
  * type.
  * @param ft_id File type identifier.
  * @return The context separator string.
+ * 
+ * Returns non-printing sequence "\x03" ie ETX (end of text) for filetypes
+ * without a context separator.
  *
  * @since 0.19
  */
@@ -303,6 +306,10 @@ const gchar *symbols_get_context_separator(gint ft_id)
 		case GEANY_FILETYPES_REST:
 			return ":::";
 
+		/* no context separator */
+		case GEANY_FILETYPES_ASCIIDOC:
+			return "\x03";
+
 		default:
 			return ".";
 	}



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list