Undo System: switch active text block when undoing

This commit is contained in:
2019-01-10 14:07:59 +11:00
parent a44ac44c1e
commit ca8f521971

View File

@@ -134,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);
}