diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-10-13 10:06:39 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-10-13 10:06:39 +0400 |
commit | 54ffc23cd59164180ea874b96ff9cd97753d6218 (patch) | |
tree | 2ef580a6ca51df367c86d982049e7cb3ae630700 /source/blender/editors/space_text/space_text.c | |
parent | 554f4df542bd968d6384609a83bd5f6c840aceb3 (diff) |
Text space
==========
Main changes:
- lines could be partially shown when they starts somewhere behind the upper
boundary of area but because of word-wrapping some part of line will be show
- fixed caret navigatiog in area when tabs aren't replaced by spaces
- highlight the whole current line not only it's wrapped segment with caret
- when you're in replace mode cursor would be as long as the tab's width if it's under tab symbol
This fixes:
#22399: Text Editor: word-wrapped lines prevent navigating through text with up-arrow.
#21163: Text editor scrollbar problem with word wrap
Diffstat (limited to 'source/blender/editors/space_text/space_text.c')
-rw-r--r-- | source/blender/editors/space_text/space_text.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c index 7f7a07f8cf7..5ee7ca3c3ef 100644 --- a/source/blender/editors/space_text/space_text.c +++ b/source/blender/editors/space_text/space_text.c @@ -92,6 +92,7 @@ static void text_free(SpaceLink *sl) SpaceText *stext= (SpaceText*) sl; stext->text= NULL; + text_free_caches(stext); } @@ -104,9 +105,11 @@ static void text_init(struct wmWindowManager *wm, ScrArea *sa) static SpaceLink *text_duplicate(SpaceLink *sl) { SpaceText *stextn= MEM_dupallocN(sl); - + /* clear or remove stuff from old */ - + + stextn->drawcache= NULL; /* space need it's own cache */ + return (SpaceLink *)stextn; } @@ -132,8 +135,11 @@ static void text_listener(ScrArea *sa, wmNotifier *wmn) switch(wmn->action) { case NA_EDITED: - if(st->text) + if(st->text) { + text_drawcache_tag_update(st, 1); text_update_edited(st->text); + } + ED_area_tag_redraw(sa); /* no break -- fall down to tag redraw */ case NA_ADDED: |