Fix T38264: undo/redo broken with text overwrite mode in text editor (insert key).

This commit is contained in:
Justin Dailey 2014-01-20 22:12:35 +01:00 committed by Brecht Van Lommel
parent e9efde2a05
commit 7c6f60572b
Notes: blender-bot 2023-02-14 11:19:22 +01:00
Referenced by issue #38264, Undo/Redo don't work properly with Text Insert Mode in Text Editor
1 changed files with 4 additions and 0 deletions

View File

@ -2620,7 +2620,11 @@ int txt_replace_char(Text *text, unsigned int add)
/* Should probably create a new op for this */
if (!undoing) {
txt_undo_add_charop(text, UNDO_INSERT_1, add);
text->curc -= add_size;
txt_pop_sel(text);
txt_undo_add_charop(text, UNDO_DEL_1, del);
text->curc += add_size;
txt_pop_sel(text);
}
return 1;
}