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.
This commit is contained in:
parent
989a1f2ccb
commit
c2d2fddca3
@ -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 ".";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user