Fix T38264: undo/redo broken with text overwrite mode in text editor (insert key).
This commit is contained in:
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
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue