aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands
diff options
context:
space:
mode:
authorMichael Davis2022-11-23 14:57:03 +0000
committerBlaž Hrastnik2022-11-24 01:57:12 +0000
commitfd00f3a70eb626242bb2fcc9bddf2c4d94580a9a (patch)
tree3c389daef7707519caa78cfe33104875b1022b70 /helix-term/src/commands
parent94eb3de7767c5d16344bec9634028f346cd867bb (diff)
Don't apply transactions to Views in undo/redo
View::apply should only be called by EditorView after 42e37a571e75aaf4feb1717dfebe8cf215e535dd. This change removes the duplicate calls within undo/redo which could cause a panic.
Diffstat (limited to 'helix-term/src/commands')
-rw-r--r--helix-term/src/commands/typed.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
index b8f99ff3..475f14d1 100644
--- a/helix-term/src/commands/typed.rs
+++ b/helix-term/src/commands/typed.rs
@@ -481,7 +481,7 @@ fn earlier(
let uk = args.join(" ").parse::<UndoKind>().map_err(|s| anyhow!(s))?;
let (view, doc) = current!(cx.editor);
- let success = doc.earlier(view, uk);
+ let success = doc.earlier(view.id, uk);
if !success {
cx.editor.set_status("Already at oldest change");
}
@@ -500,7 +500,7 @@ fn later(
let uk = args.join(" ").parse::<UndoKind>().map_err(|s| anyhow!(s))?;
let (view, doc) = current!(cx.editor);
- let success = doc.later(view, uk);
+ let success = doc.later(view.id, uk);
if !success {
cx.editor.set_status("Already at newest change");
}