Skip to content

Commit

Permalink
Return a non-printing sequence for no context separators
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
elextr committed May 15, 2013
1 parent 989a1f2 commit c2d2fdd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/symbols.c
Expand Up @@ -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
*/
Expand All @@ -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 ".";
}
Expand Down

0 comments on commit c2d2fdd

Please sign in to comment.