Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-03-12 12:46:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-12 12:46:12 +0400
commitd9960dba31cc028392665c3481e145450dc626da (patch)
tree8af8e002e2824ec4e0c370656523262cd2e967fe /source/blender/editors
parente84153a91ccd05548fb718eb612dc6155b3873c9 (diff)
fix own regression in 2.66 [#34610] Text editor: Syntax highlighting freezes
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_text/text_format.c2
-rw-r--r--source/blender/editors/space_text/text_format_lua.c2
-rw-r--r--source/blender/editors/space_text/text_format_osl.c2
-rw-r--r--source/blender/editors/space_text/text_format_py.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_text/text_format.c b/source/blender/editors/space_text/text_format.c
index 3c7897200ed..b29c6420d60 100644
--- a/source/blender/editors/space_text/text_format.c
+++ b/source/blender/editors/space_text/text_format.c
@@ -144,7 +144,7 @@ int text_check_format_len(TextLine *line, unsigned int len)
* Fill the string with formatting constant,
* advancing \a str_p and \a fmt_p
*
- * \param len length in bytes
+ * \param len length in bytes of \a fmt_p to fill.
*/
void text_format_fill(const char **str_p, char **fmt_p, const char type, const int len)
{
diff --git a/source/blender/editors/space_text/text_format_lua.c b/source/blender/editors/space_text/text_format_lua.c
index 6c72e043930..f74d1cf8e8b 100644
--- a/source/blender/editors/space_text/text_format_lua.c
+++ b/source/blender/editors/space_text/text_format_lua.c
@@ -237,7 +237,7 @@ static void txtfmt_lua_format_line(SpaceText *st, TextLine *line, const int do_n
}
/* Single line comment */
else if (*str == '-' && *(str + 1) == '-') {
- text_format_fill(&str, &fmt, FMT_TYPE_COMMENT, len - (int)(str - fs.buf));
+ text_format_fill(&str, &fmt, FMT_TYPE_COMMENT, len - (int)(fmt - line->format));
}
else if (*str == '"' || *str == '\'') {
/* Strings */
diff --git a/source/blender/editors/space_text/text_format_osl.c b/source/blender/editors/space_text/text_format_osl.c
index 7d493eb1f62..59bbd82a569 100644
--- a/source/blender/editors/space_text/text_format_osl.c
+++ b/source/blender/editors/space_text/text_format_osl.c
@@ -252,7 +252,7 @@ static void txtfmt_osl_format_line(SpaceText *st, TextLine *line, const int do_n
/* Deal with comments first */
if (*str == '/' && *(str + 1) == '/') {
/* fill the remaining line */
- text_format_fill(&str, &fmt, FMT_TYPE_COMMENT, len - (int)(str - fs.buf));
+ text_format_fill(&str, &fmt, FMT_TYPE_COMMENT, len - (int)(fmt - line->format));
}
/* C-Style (multi-line) comments */
else if (*str == '/' && *(str + 1) == '*') {
diff --git a/source/blender/editors/space_text/text_format_py.c b/source/blender/editors/space_text/text_format_py.c
index 902d60dcb3e..9562d57041f 100644
--- a/source/blender/editors/space_text/text_format_py.c
+++ b/source/blender/editors/space_text/text_format_py.c
@@ -233,7 +233,7 @@ static void txtfmt_py_format_line(SpaceText *st, TextLine *line, const int do_ne
/* Deal with comments first */
if (*str == '#') {
/* fill the remaining line */
- text_format_fill(&str, &fmt, FMT_TYPE_COMMENT, len - (int)(str - fs.buf));
+ text_format_fill(&str, &fmt, FMT_TYPE_COMMENT, len - (int)(fmt - line->format));
}
else if (*str == '"' || *str == '\'') {
/* Strings */