diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-12-31 20:40:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-12-31 20:40:14 +0400 |
commit | d191dec1d5a938c0d7d2950f5140a4811627602e (patch) | |
tree | 98ff9533c6f67255592a280dcd85b491172cf28b /source/blender/editors/space_text/text_autocomplete.c | |
parent | dd62a2c3756d4335479a561a52468a548f2f1d65 (diff) |
syntax highlight autocomplete listing.
Diffstat (limited to 'source/blender/editors/space_text/text_autocomplete.c')
-rw-r--r-- | source/blender/editors/space_text/text_autocomplete.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/space_text/text_autocomplete.c b/source/blender/editors/space_text/text_autocomplete.c index 46e2f99d3fa..31f6d92988c 100644 --- a/source/blender/editors/space_text/text_autocomplete.c +++ b/source/blender/editors/space_text/text_autocomplete.c @@ -50,6 +50,7 @@ #include "ED_screen.h" #include "UI_interface.h" +#include "text_format.h" #include "text_intern.h" /* own include */ @@ -199,9 +200,13 @@ static GHash *text_autocomplete_build(Text *text) { GHashIterator *iter = BLI_ghashIterator_new(gh); + /* get the formatter for highlighting */ + TextFormatType *tft; + tft = ED_text_format_get(text); + for (; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) { const char *s = BLI_ghashIterator_getValue(iter); - texttool_suggest_add(s, 'k'); + texttool_suggest_add(s, tft->format_identifier(s)); } BLI_ghashIterator_free(iter); |