diff options
Diffstat (limited to 'source/blender/editors/space_text/text_undo.c')
-rw-r--r-- | source/blender/editors/space_text/text_undo.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/space_text/text_undo.c b/source/blender/editors/space_text/text_undo.c index b79a77a4353..b427ce43dbb 100644 --- a/source/blender/editors/space_text/text_undo.c +++ b/source/blender/editors/space_text/text_undo.c @@ -37,7 +37,6 @@ #include "PIL_time.h" #include "BKE_context.h" -#include "BKE_library.h" #include "BKE_report.h" #include "BKE_text.h" #include "BKE_undo_system.h" @@ -135,9 +134,14 @@ static void text_undosys_step_decode(struct bContext *C, UndoStep *us_p, int dir BLI_assert(data.pos == us->data.pos); } + SpaceText *st = CTX_wm_space_text(C); + if (st) { + /* Not essential, always show text being undo where possible. */ + st->text = text; + } text_update_edited(text); text_update_cursor_moved(C); - text_drawcache_tag_update(CTX_wm_space_text(C), 1); + text_drawcache_tag_update(st, 1); WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); } |