Bugfix: Deleting backward selected text was getting stuck on redo.

Selections were not correctly preserved through undo/redo operations causing unexpected behaviour.
This commit is contained in:
Ian Thompson
2008-07-23 12:59:05 +00:00
parent 6d0e840648
commit 6b4b03317d

View File

@@ -1821,6 +1821,12 @@ void txt_do_undo(Text *text)
break;
}
/* next undo step may need evaluating */
if (text->undo_pos>=0 && text->undo_buf[text->undo_pos] == UNDO_STO) {
txt_do_undo(text);
txt_do_redo(text); /* selections need restoring */
}
undoing= 0;
}
@@ -1895,7 +1901,7 @@ void txt_do_redo(Text *text)
case UNDO_SWAP:
txt_curs_swap(text);
txt_do_undo(text); /* swaps should appear transparent a*/
txt_do_redo(text); /* swaps should appear transparent a*/
break;
case UNDO_CTO: