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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user