From c2d2fddca3854efd7ab6711a25f451a2b5cc596d Mon Sep 17 00:00:00 2001 From: elextr Date: Wed, 15 May 2013 14:03:08 +1000 Subject: [PATCH] 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. --- src/symbols.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/symbols.c b/src/symbols.c index d13f6fbd..4b6de621 100644 --- a/src/symbols.c +++ b/src/symbols.c @@ -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 "."; }