diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2019-08-13 16:35:48 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2019-08-14 17:59:37 +0300 |
commit | 05417b22206c479b5ebe8ac8e7dd73ae154c8c96 (patch) | |
tree | aa11344ee7e5fa0bf8c95ce380e347d11a3df16f /source/blender/editors/include/ED_text.h | |
parent | 72eb70f93328e4e19a319aa199f6c46a0c8ab420 (diff) |
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
Diffstat (limited to 'source/blender/editors/include/ED_text.h')
-rw-r--r-- | source/blender/editors/include/ED_text.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_text.h b/source/blender/editors/include/ED_text.h index 39d0b8b26cb..40af82acdaf 100644 --- a/source/blender/editors/include/ED_text.h +++ b/source/blender/editors/include/ED_text.h @@ -27,6 +27,7 @@ struct ARegion; struct bContext; struct SpaceText; +struct Text; struct UndoStep; struct UndoType; @@ -40,4 +41,7 @@ void ED_text_undosys_type(struct UndoType *ut); struct UndoStep *ED_text_undo_push_init(struct bContext *C); +/* text_format.c */ +bool ED_text_is_syntax_highlight_supported(struct Text *text); + #endif /* __ED_TEXT_H__ */ |