Don't clear redo stack when editing

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2021-04-09 16:50:06 +02:00
parent e534fe9112
commit d0b06a2a1d

View File

@ -153,7 +153,6 @@ impl UndoHistory {
}
fn push(&mut self, edit_id: time::Local, now: Instant) {
self.redo_stack.clear();
if let Some(edit_group) = self.undo_stack.last_mut() {
if now - edit_group.last_edit_at <= self.group_interval {
edit_group.edits.push(edit_id);