mirror of
https://github.com/helix-editor/helix.git
synced 2025-01-19 13:37:06 +04:00
Remove calls to View::apply in undo/redo/earlier/later
This commit is contained in:
parent
056a19a003
commit
53c2855643
@ -861,7 +861,7 @@ fn undo_redo_impl(&mut self, view: &mut View, undo: bool) -> bool {
|
||||
let mut history = self.history.take();
|
||||
let txn = if undo { history.undo() } else { history.redo() };
|
||||
let success = if let Some(txn) = txn {
|
||||
self.apply_impl(txn, view.id) && view.apply(txn, self)
|
||||
self.apply_impl(txn, view.id)
|
||||
} else {
|
||||
false
|
||||
};
|
||||
@ -902,7 +902,7 @@ fn earlier_later_impl(&mut self, view: &mut View, uk: UndoKind, earlier: bool) -
|
||||
};
|
||||
let mut success = false;
|
||||
for txn in txns {
|
||||
if self.apply_impl(&txn, view.id) && view.apply(&txn, self) {
|
||||
if self.apply_impl(&txn, view.id) {
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user