diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-08-31 18:06:30 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-08-31 18:09:28 +0400 |
commit | 87c76ddaffc6dfebf0b85f8ec147b4ede9552a90 (patch) | |
tree | 1c0e65787ff8a918767f22bea93e4792c959081d | |
parent | 0b4da966f9894dc6bf19c337f34f43a3119471cb (diff) |
Fix T41657: Text Editor highlight bug when a very long line scrolls
Based on patch by randon (Dun Liang), but no need to recompute lengths here, we already have the info.
-rw-r--r-- | source/blender/editors/space_text/text_draw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 6ca6b2af1fd..95802be9ef9 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -397,7 +397,8 @@ static int text_draw_wrapped(SpaceText *st, const char *str, int x, int y, int w /* skip hidden part of line */ if (skip) { skip--; - fstart = fpos; mstart = mend; + fstart = fpos = end; + mstart = mend; mend = txt_utf8_forward_columns(str + mend, max, &padding) - str; end = (wrap += max - padding); continue; |