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

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;
}