From 05417b22206c479b5ebe8ac8e7dd73ae154c8c96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 13 Aug 2019 15:35:48 +0200 Subject: Text editor: syntax highlighting + line numbers on by default The most common use of the text editor seems to be for scripting. Having line numbers and syntax highlighting enabled by default seems sensible. Syntax highlighting is now enabled by default, but is automatically disabled when the datablock has a non-highlighted extension. Highlighting is enabled for filenames like: - Text - Text.001 - somefile.py and is automatically disabled when the datablock has an extension for which Blender has no syntax highlighter registered. Reviewers: billreynish, campbellbarton Subscribers: brecht, billreynish Differential Revision: https://developer.blender.org/D5472 --- source/blender/blenlib/BLI_string_utils.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/blenlib/BLI_string_utils.h') diff --git a/source/blender/blenlib/BLI_string_utils.h b/source/blender/blenlib/BLI_string_utils.h index 9740629276d..13dbb2de659 100644 --- a/source/blender/blenlib/BLI_string_utils.h +++ b/source/blender/blenlib/BLI_string_utils.h @@ -38,6 +38,7 @@ struct ListBase; typedef bool (*UniquenameCheckCallback)(void *arg, const char *name); size_t BLI_split_name_num(char *left, int *nr, const char *name, const char delim); +bool BLI_string_is_decimal(const char *string) ATTR_NONNULL(); void BLI_string_split_suffix(const char *string, char *r_body, char *r_suf, const size_t str_len); void BLI_string_split_prefix(const char *string, char *r_pre, char *r_body, const size_t str_len); -- cgit v1.2.3